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

Catch local CRS' instead of failing in PostGIS queries #12

Open
kannes opened this issue Apr 5, 2023 · 0 comments
Open

Catch local CRS' instead of failing in PostGIS queries #12

kannes opened this issue Apr 5, 2023 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@kannes
Copy link
Contributor

kannes commented Apr 5, 2023

QGIS users can easily create custom USER:xxxx CRS. If such a CRS ends up in a filter definition for a PostGIS layer, the filter won't work as the (remote) PostGIS db probably won't know the custom CRS.

It would be best to catch all CRS that are not authoritative (EPSG or similar) and notify the user accordingly if the project is set to such a CRS.

SELECT DISTINCT auth_name, count(*)
FROM public.spatial_ref_sys
GROUP BY auth_name;

on some random PostGIS DB lists:

EPSG	6184
ESRI	2315
spatialreferencing.org	1

So it seems that EPSG and ESRI codes are what is supported on both ends.

Maybe QGIS has methods to determine the CRS' authority, otherwise we could just inspect the ID string manually.

@kannes kannes added bug Something isn't working good first issue Good for newcomers labels Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant