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

proj strings with +type=crs and EPSG codes are not handled #12288

Open
namdre opened this issue Dec 13, 2022 · 0 comments
Open

proj strings with +type=crs and EPSG codes are not handled #12288

namdre opened this issue Dec 13, 2022 · 0 comments
Assignees
Milestone

Comments

@namdre
Copy link
Contributor

namdre commented Dec 13, 2022

So far or projection handling only seems to work for projection type 22 ( OTHER_COORDINATE_OPERATION)
I couldn't figure out how to call proj_trans with any projection of type 15 (PROJECTED_CRS)
See https://proj.org/development/reference/datatypes.html#c.PJ_TYPE

Possibly we should be using proj_create_crs_to_crs (OSGeo/PROJ#2087)
This would require making the input CRS explicit (currently, netconvert assumes WGS84)

The following works:
--proj.utm:
--proj "+proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"
--proj "+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs"

This doesn't work:
--proj "+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +type=crs"
--proj "EPSG:32632"

This is what the PRO documentation has to say about this topic:

If a proj-string contains a +type=crs option, then it is interpreted as a CRS definition. In particular geographic CRS are assumed to have axis in the longitude, latitude order and with degree angular unit. The use of proj-string to describe a CRS is discouraged. It is a legacy means of conveying CRS descriptions: use of object codes (EPSG:XXXX typically) or WKT description is recommended for better expressivity.

If a proj-string does not contain +type=crs, then it is interpreted as a coordination operation / transformation.

@namdre namdre self-assigned this Dec 13, 2022
@namdre namdre changed the title proj strings with +type=crs are not handled proj strings with +type=crs and EPSG codes are not handled Dec 13, 2022
@behrisch behrisch added this to the 2.0.0 milestone Dec 20, 2022
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

2 participants