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

DOC: Add list of keys for proj_context_get_database_metadata #2924

Closed
snowman2 opened this issue Nov 5, 2021 · 8 comments · Fixed by #2925
Closed

DOC: Add list of keys for proj_context_get_database_metadata #2924

snowman2 opened this issue Nov 5, 2021 · 8 comments · Fixed by #2925

Comments

@snowman2
Copy link
Contributor

snowman2 commented Nov 5, 2021

It would be useful to be able to get the database version of EPSG|ESRI|etc. through the C-API for informational purposes. That way the user can see what version(s) the current PROJ database is using.

@rouault
Copy link
Member

rouault commented Nov 5, 2021

This is covered by using proj_context_get_database_metadata and querying the keys of https://github.com/OSGeo/PROJ/blob/master/data/sql/metadata.sql

@snowman2
Copy link
Contributor Author

snowman2 commented Nov 5, 2021

Perfect! Thanks 👍

@snowman2
Copy link
Contributor Author

snowman2 commented Nov 5, 2021

Reopening because it is missing the ESRI database version in there. Any other database versions that would be good to add?

@snowman2
Copy link
Contributor Author

snowman2 commented Nov 5, 2021

Looks like ESRI 12.8? #2717

@rouault
Copy link
Member

rouault commented Nov 5, 2021

The ESRI specific metadata is set in https://raw.githubusercontent.com/OSGeo/PROJ/master/data/sql/esri.sql
Simlarly for https://raw.githubusercontent.com/OSGeo/PROJ/master/data/sql/ignf.sql
Perhaps those known keys should be documented in proj_context_get_database_metadata()

@snowman2
Copy link
Contributor Author

snowman2 commented Nov 5, 2021

Would it make sense to move the versions to sql/metadata.sql and add a note in the other files to update sql/metadata.sql?

@rouault
Copy link
Member

rouault commented Nov 5, 2021

Would it make sense to move the versions to sql/metadata.sql and add a note in the other files to update sql/metadata.sql?

the versions set in esri.sql and ignf.sql are done by their respective import scripts. I believe it is better if the import script set the versions as part as the import process to avoid (forgetting to) updating them manually.

@snowman2 snowman2 changed the title ENH: Add C-API method to get EPSG|ESRI|etc. database versions DOC: Add list of keys for proj_context_get_database_metadata Nov 5, 2021
@snowman2
Copy link
Contributor Author

snowman2 commented Nov 5, 2021

Makes sense to me. I updated the issue title.

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

Successfully merging a pull request may close this issue.

2 participants