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

IAU CRSs invalid projection (crs not found) from URLs, fine from URNs #3568

Closed
AndrewAnnex opened this issue Jan 18, 2023 · 1 comment
Closed
Assignees
Labels

Comments

@AndrewAnnex
Copy link
Contributor

IAU CRS codes such as IAU_2015:49900 added in #2876 are available via IAU_2015:49900 and by urns like `'urn:ogc:def:crs:IAU:2015:49900' but URLs recently added by the OGC NA like https://www.opengis.net/def/crs/IAU/2015/49900 result in a proj_create: crs not found error in projects like pyproj.

I am using the latest release of pyproj (3.4.1) when I run into this error but I believe the error is internal to Proj.

Example of problem

import pyproj 
print(pyproj.__version__, pyproj.proj_version_str) # 3.4.1, 9.1.0 
pyproj.CRS('IAU_2015:49900') # passes
pyproj.CRS('urn:ogc:def:crs:IAU:2015:49900') # passes
pyproj.CRS('http://www.opengis.net/def/crs/IAU/2015/49900')  # fails 

exception:

File pyproj/_crs.pyx:2352, in pyproj._crs._CRS.__init__()

CRSError: Invalid projection: http://www.opengis.net/def/crs/IAU/2015/49900: (Internal Proj Error: proj_create: crs not found)

Problem description

URLs from the OGC NA for IAU projections should resolve just the same as the URNs. I am not sure how PROJ checks if a crs is valid, so maybe there is some internal database file to update?

Expected Output

no invalid projection errors

Environment Information

  • PROJ version 9.1.0
  • Operation System Information (macOS 13.1)

Installation method

  • Python 3.10.8 using poetry to install things
@rouault rouault self-assigned this Jan 18, 2023
rouault added a commit that referenced this issue Jan 19, 2023
@AndrewAnnex
Copy link
Contributor Author

thanks @rouault !

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

No branches or pull requests

2 participants