calvinmetcalf / shapefile-js

Convert a Shapefile to GeoJSON. Not many caveats.
http://calvinmetcalf.github.io/shapefile-js/
715 stars 228 forks source link

Some docs about automatic projection #114

Closed zzolo closed 2 years ago

zzolo commented 5 years ago

It would very helpful if there was documentation that this module automatic projects the shapefile to WGS84/EPSG:4326. I lost a lot of time to this trying to debug why my data was so off.

And though I can see from other issues that you are not that interested in adding an option to define what projection gets used or to turn off projection, it would be saw awesome if that was in here.

Thanks.

xinaesthete commented 3 years ago

I'd also like to see some options /docs for controlling the projection. I see that it is apparently possible to specify prj with parseShp(), not sure if it can be easily told to bypass it, and no such option at all when processing a zip. I'm currently churning through data in OSGB coordinates and burning a lot of cycles converting back again after loading (the majority of the cost of the conversion is also in projection, so it's quite a bottleneck here).

Have to say I'm pretty happy with my experience though after fighting with trying to get GDAL to cooperate, this library Just Worked.

edit: fwiw, I just hacked my local build of shp.js so that proj4 is crudely bypassed and that's working fine for my current use.