diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-11-18 22:33:48 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-11-18 22:41:24 +0100 |
| commit | df339795a8af5487cbff234083a8151c1b3eb181 (patch) | |
| tree | a5e1a8ee5cdadc9eedff51470b02b04c6d4e7fab /scripts/build_db.py | |
| parent | b063035618a00218daed43260750ee4e60d5c84e (diff) | |
| download | PROJ-df339795a8af5487cbff234083a8151c1b3eb181.tar.gz PROJ-df339795a8af5487cbff234083a8151c1b3eb181.zip | |
Database: add a publication_date column to geodetic_datum and vertical_datum
Populated from realization_epoch column from EPSG
The 'publication_date' naming is from OGC Topic 2, and hasn't been yet adopted
by the EPSG dataset.
See http://docs.opengeospatial.org/as/18-005r4/18-005r4.html , Annex G, clause 11
and https://32zn56499nov99m251h4e9t8-wpengine.netdna-ssl.com/wp-content/uploads/2019/09/EPSG-relational-data-model-changes_2019-09-18.pdf
Diffstat (limited to 'scripts/build_db.py')
| -rwxr-xr-x | scripts/build_db.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/build_db.py b/scripts/build_db.py index ba1502ae..dbb1c727 100755 --- a/scripts/build_db.py +++ b/scripts/build_db.py @@ -94,12 +94,12 @@ def fill_geodetic_datum(proj_db_cursor): raise Exception('Found unexpected datum_type in epsg_datum: %s' % str(res)) proj_db_cursor.execute( - "INSERT INTO geodetic_datum SELECT ?, datum_code, datum_name, NULL, NULL, ?, ellipsoid_code, ?, prime_meridian_code, ?, area_of_use_code, deprecated FROM epsg.epsg_datum WHERE datum_type = 'geodetic'", (EPSG_AUTHORITY, EPSG_AUTHORITY, EPSG_AUTHORITY, EPSG_AUTHORITY)) + "INSERT INTO geodetic_datum SELECT ?, datum_code, datum_name, NULL, NULL, ?, ellipsoid_code, ?, prime_meridian_code, ?, area_of_use_code, CASE WHEN realization_epoch = '' THEN NULL ELSE realization_epoch END, deprecated FROM epsg.epsg_datum WHERE datum_type = 'geodetic'", (EPSG_AUTHORITY, EPSG_AUTHORITY, EPSG_AUTHORITY, EPSG_AUTHORITY)) def fill_vertical_datum(proj_db_cursor): proj_db_cursor.execute( - "INSERT INTO vertical_datum SELECT ?, datum_code, datum_name, NULL, NULL, ?, area_of_use_code, deprecated FROM epsg.epsg_datum WHERE datum_type = 'vertical'", (EPSG_AUTHORITY,EPSG_AUTHORITY)) + "INSERT INTO vertical_datum SELECT ?, datum_code, datum_name, NULL, NULL, ?, area_of_use_code, CASE WHEN realization_epoch = '' THEN NULL ELSE realization_epoch END, deprecated FROM epsg.epsg_datum WHERE datum_type = 'vertical'", (EPSG_AUTHORITY,EPSG_AUTHORITY)) def fill_coordinate_system(proj_db_cursor): |
