From 2db54cc09a6587eba855aebac05baa1ae5130c2c Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 17 Sep 2021 19:19:37 +0200 Subject: Database: add a 'anchor' field to geodetic_datum and vertical_datum tables Update database layout version number to 1.2 consequently This new capability will be used by IAU planetary CRS (refs #2601) --- scripts/build_db.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/build_db.py') diff --git a/scripts/build_db.py b/scripts/build_db.py index 772b2dad..a11fc14b 100755 --- a/scripts/build_db.py +++ b/scripts/build_db.py @@ -201,7 +201,7 @@ def fill_geodetic_datum(proj_db_cursor): for (datum_code, datum_name, ellipsoid_code, prime_meridian_code, publication_date, frame_reference_epoch, deprecated) in res: publication_date = compute_publication_date(datum_code, datum_name, frame_reference_epoch, publication_date) proj_db_cursor.execute( - "INSERT INTO geodetic_datum VALUES (?, ?, ?, NULL, ?, ?, ?, ?, ?, ?, NULL, ?)", (EPSG_AUTHORITY, datum_code, datum_name, EPSG_AUTHORITY, ellipsoid_code, EPSG_AUTHORITY, prime_meridian_code, publication_date, frame_reference_epoch, deprecated)) + "INSERT INTO geodetic_datum VALUES (?, ?, ?, NULL, ?, ?, ?, ?, ?, ?, NULL, NULL, ?)", (EPSG_AUTHORITY, datum_code, datum_name, EPSG_AUTHORITY, ellipsoid_code, EPSG_AUTHORITY, prime_meridian_code, publication_date, frame_reference_epoch, deprecated)) def fill_vertical_datum(proj_db_cursor): @@ -211,7 +211,7 @@ def fill_vertical_datum(proj_db_cursor): for (datum_code, datum_name, publication_date, frame_reference_epoch, deprecated) in res: publication_date = compute_publication_date(datum_code, datum_name, frame_reference_epoch, publication_date) proj_db_cursor.execute( - "INSERT INTO vertical_datum VALUES (?, ?, ?, NULL, ?, ?, NULL, ?)", (EPSG_AUTHORITY, datum_code, datum_name, publication_date, frame_reference_epoch, deprecated)) + "INSERT INTO vertical_datum VALUES (?, ?, ?, NULL, ?, ?, NULL, NULL, ?)", (EPSG_AUTHORITY, datum_code, datum_name, publication_date, frame_reference_epoch, deprecated)) def fill_datumensemble(proj_db_cursor): @@ -235,7 +235,7 @@ def fill_datumensemble(proj_db_cursor): assert ellipsoid_code, datum_code assert prime_meridian_code, datum_code proj_db_cursor.execute( - "INSERT INTO geodetic_datum (auth_name, code, name, description, ellipsoid_auth_name, ellipsoid_code, prime_meridian_auth_name, prime_meridian_code, publication_date, frame_reference_epoch, ensemble_accuracy, deprecated) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", (EPSG_AUTHORITY, datum_code, datum_name, None, EPSG_AUTHORITY, ellipsoid_code, EPSG_AUTHORITY, prime_meridian_code, None, None, ensemble_accuracy, deprecated)) + "INSERT INTO geodetic_datum (auth_name, code, name, description, ellipsoid_auth_name, ellipsoid_code, prime_meridian_auth_name, prime_meridian_code, publication_date, frame_reference_epoch, ensemble_accuracy, anchor, deprecated) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", (EPSG_AUTHORITY, datum_code, datum_name, None, EPSG_AUTHORITY, ellipsoid_code, EPSG_AUTHORITY, prime_meridian_code, None, None, ensemble_accuracy, None, deprecated)) proj_db_cursor.execute("SELECT datum_code, datum_sequence FROM epsg.epsg_datumensemblemember WHERE datum_ensemble_code = ? ORDER by datum_sequence", (datum_code,)) for member_code, sequence in proj_db_cursor.fetchall(): -- cgit v1.2.3