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

Parse WKT strings effectively #24

Closed
iannesbitt opened this issue May 19, 2023 · 1 comment
Closed

Parse WKT strings effectively #24

iannesbitt opened this issue May 19, 2023 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@iannesbitt
Copy link
Contributor

Found while investigating #14:
Currently, WKT strings are parsed to get the last EPSG code from the string, rather than query the object to get the code from the correct field. This results in issues with COMPD_CS (compound coordinate system) WKT strings. For example, the following resolves to 3855 rather than the anticipated 32603. This should be handled pythonicly, ideally by reading the string to nested objects and addressing them structurally rather than by the brute force method currently used.

COMPD_CS["WGS 84 / UTM zone 3N + EGM2008 height",PROJCS["WGS 84 / UTM zone 3N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32603"]],VERT_CS["EGM2008 height",VERT_DATUM["EGM2008 geoid",2005,AUTHORITY["EPSG","1027"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Gravity-related height",UP],AUTHORITY["EPSG","3855"]]]
@iannesbitt
Copy link
Contributor Author

Solved by implementation of pyproj.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant