Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PostgreSQL provider] Retrieve CRS from spatial_ref_sys
instead of relying on QgsCoordinateReferenceSystem::createFromPostgisSrid() which contrary to what its name suggest doesn't use postgis at all, but the QGIS CRS database. I detected the issue initially on a database where my spatial_ref_sys table had been emptied and a few entries where assigned with SRIDs in the EPSG range but with definitions that weren't the ones from EPSG. There is no guarantee that EPSG:XXXX gets a SRID of XXXX And the past implementation of the fallback case of QgsPostgresProvider::crs() only looked at proj4text instead of using the WKT from srtext.
- Loading branch information
1 parent
f21ea8c
commit 25faed2
Showing
2 changed files
with
43 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters