Ticket #2123 (closed enhancement: fixed)
use the "auth_srid" to avoid mismatches between OGR and PostGIS WKTs of EPSG codes
| Reported by: | msieczka | Owned by: | rouault |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.5.2 |
| Component: | OGR_SF | Version: | 1.5.0 betas/RCs |
| Severity: | normal | Keywords: | postgis pg |
| Cc: | warmerdam, project10, jmckenna |
Description (last modified by warmerdam) (diff)
To avoid mismatches between OGR's EPSG->WKT and PostGIS's "srtext" strings due to formatting differences, look-up the "spatial_ref_sys" table for "auth_srid" equal to the EPSG code requested, check if "auth_name" is "EPSG", and use the "auth_srid" value then. That would guarantee that a correct EPSG code is used; see:
SELECT srid,auth_name,auth_srid FROM spatial_ref_sys WHERE auth_srid=2180; srid | auth_name | auth_srid ------+-----------+----------- 2180 | EPSG | 2180
Some more details in discussion at [1].
[1] http://thread.gmane.org/gmane.comp.gis.gdal.devel/10433/focus=13927
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

