diff options
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'); |
