From 7492e65bfebadfcd44d3e2e4916a9d19e4bc6ae2 Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Sat, 2 Nov 2019 18:48:20 +0100
Subject: Add a geoid_model name in database, use GEOIDMODEL for
 transformations, add a proj_create_vertical_crs_ex()

---
 data/sql/commit.sql | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

(limited to 'data/sql/commit.sql')

diff --git a/data/sql/commit.sql b/data/sql/commit.sql
index eb49828a..a708df0f 100644
--- a/data/sql/commit.sql
+++ b/data/sql/commit.sql
@@ -29,6 +29,22 @@ FOR EACH ROW BEGIN
         WHERE (SELECT 1 FROM object_view LIMIT 1) = 0;
     SELECT RAISE(ABORT, 'corrupt definition of authority_list')
         WHERE (SELECT 1 FROM authority_list LIMIT 1) = 0;
+
+    -- check geoid_model table
+    SELECT RAISE(ABORT, 'missing GEOID99 in geoid_model')
+        WHERE NOT EXISTS(SELECT 1 FROM geoid_model WHERE name = 'GEOID99');
+    SELECT RAISE(ABORT, 'missing GEOID03 in geoid_model')
+        WHERE NOT EXISTS(SELECT 1 FROM geoid_model WHERE name = 'GEOID03');
+    SELECT RAISE(ABORT, 'missing GEOID06 in geoid_model')
+        WHERE NOT EXISTS(SELECT 1 FROM geoid_model WHERE name = 'GEOID06');
+    SELECT RAISE(ABORT, 'missing GEOID09 in geoid_model')
+        WHERE NOT EXISTS(SELECT 1 FROM geoid_model WHERE name = 'GEOID09');
+    SELECT RAISE(ABORT, 'missing GEOID12A in geoid_model')
+        WHERE NOT EXISTS(SELECT 1 FROM geoid_model WHERE name = 'GEOID12A');
+    SELECT RAISE(ABORT, 'missing GEOID12B in geoid_model')
+        WHERE NOT EXISTS(SELECT 1 FROM geoid_model WHERE name = 'GEOID12B');
+    SELECT RAISE(ABORT, 'missing GEOID18 in geoid_model')
+        WHERE NOT EXISTS(SELECT 1 FROM geoid_model WHERE name = 'GEOID18');
 END;
 INSERT INTO dummy DEFAULT VALUES;
 DROP TRIGGER final_checks;
-- 
cgit v1.2.3

