mapbox / mapnik-omnivore

Node module that returns metadata about spatial files.
45 stars 19 forks source link

Exit during forward projection of shapefile extent #175

Open mapsam opened 6 years ago

mapsam commented 6 years ago

If a shapefile has some sort of invalid projection, it isn't able to forward project the extent value. https://github.com/mapbox/mapnik-omnivore/blob/29ead3673df622c773f334ec555d3d749a9c673f/lib/shape.js#L99 and the process bails out. Let's try/catch this to ensure the file is reprojectable.

cc @GretaCB @millzpaugh

GretaCB commented 6 years ago

@mapsam Good catch. Also, what do you mean by "forward project"?

mapsam commented 6 years ago

From @flippmoke - here's what forward/backward mean in mapnik terms

Projection A;
Projection B;

Transformer T(A, B);

T.forward(data); // A to B of data

T.backward(data); // B to A of data