aboutsummaryrefslogtreecommitdiff
path: root/data/sql/proj_db_table_defs.sql
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-01-23 13:08:23 +0100
committerEven Rouault <even.rouault@spatialys.com>2020-01-23 13:08:23 +0100
commit00dd98457af1f32e7bb2b9677f6319f72fcfacf9 (patch)
tree546017ea45eec491b107bf238f0efd45acc6264e /data/sql/proj_db_table_defs.sql
parentffcd6253bb6b275cfc8884eeb88aa2eeac75e3b6 (diff)
downloadPROJ-00dd98457af1f32e7bb2b9677f6319f72fcfacf9.tar.gz
PROJ-00dd98457af1f32e7bb2b9677f6319f72fcfacf9.zip
Database: add a geoid_like value for proj_method column of grid_alternatives, fix related entries and simplify/robustify logic to deal with EPSG 'Geographic3D to GravityRelatedHeight' methods
Diffstat (limited to 'data/sql/proj_db_table_defs.sql')
-rw-r--r--data/sql/proj_db_table_defs.sql7
1 files changed, 4 insertions, 3 deletions
diff --git a/data/sql/proj_db_table_defs.sql b/data/sql/proj_db_table_defs.sql
index 14e0c789..59cef3bc 100644
--- a/data/sql/proj_db_table_defs.sql
+++ b/data/sql/proj_db_table_defs.sql
@@ -1092,7 +1092,7 @@ CREATE TABLE grid_alternatives(
original_grid_name TEXT NOT NULL PRIMARY KEY, -- original grid name (e.g. Und_min2.5x2.5_egm2008_isw=82_WGS84_TideFree.gz). For LOS/LAS format, the .las files
proj_grid_name TEXT NOT NULL, -- PROJ grid name (e.g egm08_25.gtx)
proj_grid_format TEXT NOT NULL, -- one of 'CTable2', 'NTv1', 'NTv2', 'GTX'
- proj_method TEXT NOT NULL, -- hgridshift or vgridshift
+ proj_method TEXT NOT NULL, -- hgridshift, vgridshift or geoid_like
inverse_direction BOOLEAN NOT NULL CHECK (inverse_direction IN (0, 1)), -- whether the PROJ grid direction is reversed w.r.t to the authority one (TRUE in that case)
package_name TEXT, -- package name that contains the file
url TEXT, -- optional URL where to download the PROJ grid
@@ -1102,9 +1102,10 @@ CREATE TABLE grid_alternatives(
CONSTRAINT fk_grid_alternatives_grid_packages FOREIGN KEY (package_name) REFERENCES grid_packages(package_name),
CONSTRAINT check_grid_alternatives_grid_fromat CHECK (proj_grid_format IN ('CTable2', 'NTv1', 'NTv2', 'GTX')),
- CONSTRAINT check_grid_alternatives_proj_method CHECK (proj_method IN ('hgridshift', 'vgridshift')),
+ CONSTRAINT check_grid_alternatives_proj_method CHECK (proj_method IN ('hgridshift', 'vgridshift', 'geoid_like')),
CONSTRAINT check_grid_alternatives_not_hgridshift CHECK (NOT(proj_method != 'hgridshift' AND proj_grid_format IN ('CTable2', 'NTv1', 'NTv2'))),
- CONSTRAINT check_grid_alternatives_not_vgridshift CHECK (NOT(proj_method != 'vgridshift' AND proj_grid_format IN ('GTX'))),
+ CONSTRAINT check_grid_alternatives_not_vgridshift CHECK (NOT(proj_method = 'hgridshift' AND proj_grid_format IN ('GTX'))),
+ CONSTRAINT check_grid_alternatives_inverse_direction CHECK (NOT(proj_method = 'geoid_like' AND inverse_direction = 1)),
CONSTRAINT check_grid_alternatives_package_name_url CHECK (NOT(package_name IS NOT NULL AND url IS NOT NULL)),
CONSTRAINT check_grid_alternatives_direct_download_url CHECK (NOT(direct_download IS NULL AND url IS NOT NULL)),
CONSTRAINT check_grid_alternatives_open_license_url CHECK (NOT(open_license IS NULL AND url IS NOT NULL))