diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2018-11-14 17:40:42 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2018-11-14 22:48:29 +0100 |
| commit | d928db15d53805d9b728b440079756081961c536 (patch) | |
| tree | e862a961d26bedb34c58e4f28ef0bdeedb5f3225 /data/sql/commit.sql | |
| parent | 330e8bf686f9c4524075ca1ff50cbca6c9e091da (diff) | |
| download | PROJ-d928db15d53805d9b728b440079756081961c536.tar.gz PROJ-d928db15d53805d9b728b440079756081961c536.zip | |
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
Diffstat (limited to 'data/sql/commit.sql')
| -rw-r--r-- | data/sql/commit.sql | 28 |
1 files changed, 28 insertions, 0 deletions
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 |
