Skip to content

Commit

Permalink
Database: stronger checks on extent of grid_transformation regarding …
Browse files Browse the repository at this point in the history
…the extent of the source and target CRS
  • Loading branch information
rouault committed Apr 1, 2021
1 parent dbf4789 commit 17b42f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions data/sql/commit.sql
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ FOR EACH ROW BEGIN
SELECT RAISE(ABORT, 'The area of use of at least one coordinate_operation does not intersect the one of its source CRS')
WHERE EXISTS (SELECT * FROM coordinate_operation_view v, crs_view c, usage vu, extent ve, usage cu, extent ce WHERE
v.deprecated = 0 AND
v.auth_name NOT IN ('EPSG', 'ESRI', 'IGNF') AND
(v.table_name = 'grid_transformation' OR v.auth_name NOT IN ('EPSG', 'ESRI', 'IGNF')) AND
v.source_crs_auth_name = c.auth_name AND
v.source_crs_code = c.code AND
vu.object_table_name = v.table_name AND
Expand All @@ -156,7 +156,8 @@ FOR EACH ROW BEGIN
SELECT RAISE(ABORT, 'The area of use of at least one coordinate_operation does not intersect the one of its target CRS')
WHERE EXISTS (SELECT * FROM coordinate_operation_view v, crs_view c, usage vu, extent ve, usage cu, extent ce WHERE
v.deprecated = 0 AND
v.auth_name NOT IN ('EPSG', 'ESRI', 'IGNF') AND
((v.table_name = 'grid_transformation' AND NOT (v.auth_name = 'IGNF' AND v.code = 'TSG1185'))
OR v.auth_name NOT IN ('EPSG', 'ESRI', 'IGNF')) AND
v.target_crs_auth_name = c.auth_name AND
v.target_crs_code = c.code AND
vu.object_table_name = v.table_name AND
Expand Down

0 comments on commit 17b42f6

Please sign in to comment.