Skip to content

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

@kannes

Description

@kannes

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions