Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More flexible readEpsgFromParameters function #65

Open
pomadchin opened this issue Aug 15, 2020 · 0 comments
Open

More flexible readEpsgFromParameters function #65

pomadchin opened this issue Aug 15, 2020 · 0 comments

Comments

@pomadchin
Copy link
Member

pomadchin commented Aug 15, 2020

In case a bit corrupted proj4 string passed (i.e. “+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs”1 instead of the correct “+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs”). The readEpsgFromParameters function returns null. I would expected it to return the WebMercator EPSG code:

val proj4string = "+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs"
val crsFactory = new CRSCache()
val epsg = crsFactory.readEpsgFromParameters(proj4string) //> null

May be it is possible to make this parser more flexible.

Reference to the discussion: locationtech/geotrellis#3281 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant