From d928db15d53805d9b728b440079756081961c536 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 14 Nov 2018 17:40:42 +0100 Subject: Implement RFC 2: Initial integration of "GDAL SRS barn" work This work mostly consists of: - a C++ implementation of the ISO-19111:2018 / OGC Topic 2 "Referencing by coordinates" classes to represent Datums, Coordinate systems, CRSs (Coordinate Reference Systems) and Coordinate Operations. - methods to convert between this C++ modeling and WKT1, WKT2 and PROJ string representations of those objects - management and query of a SQLite3 database of CRS and Coordinate Operation definition - a C API binding part of those capabilities This is all-in-one squashed commit of the work of https://github.com/OSGeo/proj.4/pull/1040 --- data/sql/commit.sql | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 data/sql/commit.sql (limited to 'data/sql/commit.sql') diff --git a/data/sql/commit.sql b/data/sql/commit.sql new file mode 100644 index 00000000..346c5b76 --- /dev/null +++ b/data/sql/commit.sql @@ -0,0 +1,28 @@ +COMMIT; + +-- Do an explicit foreign_key_check as foreign key checking is a no-op within +-- a transaction. Unfortunately we can't ask for this to be an error, so this +-- is just for verbose output. In Makefile, we check this separately +PRAGMA foreign_key_check; + +-- Final consistency checks +CREATE TABLE dummy(foo); +CREATE TRIGGER final_checks +BEFORE INSERT ON dummy +FOR EACH ROW BEGIN + + -- check that view definitions have no error + SELECT RAISE(ABORT, 'corrupt definition of coordinate_operation_view') + WHERE (SELECT 1 FROM coordinate_operation_view LIMIT 1) = 0; + SELECT RAISE(ABORT, 'corrupt definition of crs_view') + WHERE (SELECT 1 FROM crs_view LIMIT 1) = 0; + SELECT RAISE(ABORT, 'corrupt definition of object_view') + 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; +END; +INSERT INTO dummy DEFAULT VALUES; +DROP TRIGGER final_checks; +DROP TABLE dummy; + +VACUUM; \ No newline at end of file -- cgit v1.2.3