diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-06-06 22:23:43 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-06-06 22:24:14 +0200 |
| commit | a24cf969aab61d950de916b48de88229b05a00f4 (patch) | |
| tree | 5224c776fc48ea4de68950ed383d500b7254e165 /data/sql/commit.sql | |
| parent | c6ff686bf8334efce9995dacc899022d3a5b813b (diff) | |
| download | PROJ-a24cf969aab61d950de916b48de88229b05a00f4.tar.gz PROJ-a24cf969aab61d950de916b48de88229b05a00f4.zip | |
Database: make sure we can deal with 'Geog3D to Geog2D+GravityRelatedHeight' records as we do with the more common 'Geographic3D to GravityRelatedHeight'
Diffstat (limited to 'data/sql/commit.sql')
| -rw-r--r-- | data/sql/commit.sql | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/data/sql/commit.sql b/data/sql/commit.sql index d090ccb2..55df332f 100644 --- a/data/sql/commit.sql +++ b/data/sql/commit.sql @@ -32,9 +32,20 @@ FOR EACH ROW BEGIN -- test to check that our custom grid transformation overrides are really needed SELECT RAISE(ABORT, 'PROJ grid_transformation defined whereas EPSG has one') - WHERE EXISTS (SELECT 1 FROM grid_transformation g1, grid_transformation g2 WHERE - lower(g1.grid_name) = lower(g2.grid_name) AND - g1.auth_name = 'PROJ' AND g2.auth_name = 'EPSG'); + WHERE EXISTS (SELECT 1 FROM grid_transformation g1 + JOIN grid_transformation g2 + ON g1.source_crs_auth_name = g2.source_crs_auth_name + AND g1.source_crs_code = g2.source_crs_code + AND g1.target_crs_auth_name = g2.target_crs_auth_name + AND g1.target_crs_code = g2.target_crs_code + WHERE g1.auth_name = 'PROJ' AND g2.auth_name = 'EPSG') + OR EXISTS (SELECT 1 FROM grid_transformation g1 + JOIN grid_transformation g2 + ON g1.source_crs_auth_name = g2.target_crs_auth_name + AND g1.source_crs_code = g2.target_crs_code + AND g1.target_crs_auth_name = g1.source_crs_auth_name + AND g1.target_crs_code = g1.source_crs_code + WHERE g1.auth_name = 'PROJ' AND g2.auth_name = 'EPSG'); SELECT RAISE(ABORT, 'Arg! there is now a EPSG:102100 object. Hack in createFromUserInput() will no longer work') WHERE EXISTS(SELECT 1 FROM crs_view WHERE auth_name = 'EPSG' AND code = '102100'); |
