calvinmetcalf / shapefile-js

Convert a Shapefile to GeoJSON. Not many caveats.
http://calvinmetcalf.github.io/shapefile-js/
MIT License
735 stars 230 forks source link

Fix parse projection #72

Closed usman88 closed 7 years ago

usman88 commented 7 years ago

Unable to load a shp with the following prj string:

"GEOGCS ["GCS_WGS_1984",["DATUM","D_WGS_1984",["SPHEROID","WGS_1984",6378137.0,298.257223563]],["PRIMEM","Greenwich",0.0],["UNIT","Degree",0.0174532925199433]]"

This change removes the space character after GEOGCS when parsing the prj string.

calvinmetcalf commented 7 years ago

you want to open this in proj4js, specifically here, that being said, that's not what your change does, your change removes the first space it finds, which is probably not what we want. That being said you probably just want to fix your proj string, it's technically valid but rare enough you probably should consider it broken.