Giter VIP home page Giter VIP logo

node-wmtiff's People

Contributors

kapadia avatar mapsam avatar millzpaugh avatar rclark avatar wilhelmberg avatar yhahn avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-wmtiff's Issues

Segfault with unknown SRS

When running wmtiff with a tiff that has an unknown srs, we get a segmentation fault in gdal.suggestedWarpOutput, which isn't caught and leads to some nasty things upstream. I think it would be good to wrap the reprojection process here within a try/catch, which is pretty standard for node-gdal.

Uncaught error:

Hit an uncaught error with the gdal.open() method earlier today:

/Users/mapsam/mapbox/node-wmtiff/node_modules/gdal/lib/gdal.js:546
			return driver.create.apply(driver, args);
			                     ^

Error: Error creating dataset
    at Error (native)
    at Object.open (/Users/mapsam/mapbox/node-wmtiff/node_modules/gdal/lib/gdal.js:546:25)
    at Object.reproject (/Users/mapsam/mapbox/node-wmtiff/index.js:59:22)
    at Object.<anonymous> (/Users/mapsam/mapbox/node-wmtiff/bin/wmtiff:17:8)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)

Let's add a try/catch around this so we can return something more useful.

cc @GretaCB

Reproject function should not accept a callback function

The reproject function is not asynchronous, and hence it should not accept a callback function.

If it does, it would be anticipation of asynchronous support in node-gdal, and in that case it needs to try/catch errors that could arise from node-gdal calls and provide those to the callback.

cc @GretaCB

Vague [Error] during from gdal.reprojectImage()

When running gdal.reprojectImage() with a particular file, the error returned is simple [Error] and is missing a message. Perhaps these GDAL operations aren't producing errors as expected?

Here's the gdalinfo from the file:

Driver: GTiff/GeoTIFF
Files: <file>.tif
Size is 28378, 6866
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (5.288197698200356,51.872941844847738)
Pixel Size = (0.000000566494059,-0.000000566494059)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (   5.2881977,  51.8729418) (  5d17'17.51"E, 51d52'22.59"N)
Lower Left  (   5.2881977,  51.8690523) (  5d17'17.51"E, 51d52' 8.59"N)
Upper Right (   5.3042737,  51.8729418) (  5d18'15.39"E, 51d52'22.59"N)
Lower Right (   5.3042737,  51.8690523) (  5d18'15.39"E, 51d52' 8.59"N)
Center      (   5.2962357,  51.8709971) (  5d17'46.45"E, 51d52'15.59"N)
Band 1 Block=28378x1 Type=Byte, ColorInterp=Red
  NoData Value=0
Band 2 Block=28378x1 Type=Byte, ColorInterp=Green
  NoData Value=0
Band 3 Block=28378x1 Type=Byte, ColorInterp=Blue
  NoData Value=0
Band 4 Block=28378x1 Type=Byte, ColorInterp=Alpha
  NoData Value=0

I'll work on creating a test fixture

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.