aboutsummaryrefslogtreecommitdiff
path: root/scripts/build_db.py
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-12-09 16:44:56 +0100
committerGitHub <noreply@github.com>2021-12-09 16:44:56 +0100
commit90997086e19251190d367d60e329288324a727a1 (patch)
treecee7b1b7870f05b9baad1c79feda77c5eb1882fd /scripts/build_db.py
parent8bda42cc12a11e7348abadc8288f0372191918cc (diff)
parent389b2a1378a726c0ef3fe6dabc505ed0e2ef6a85 (diff)
downloadPROJ-90997086e19251190d367d60e329288324a727a1.tar.gz
PROJ-90997086e19251190d367d60e329288324a727a1.zip
Merge pull request #2974 from OSGeo/backport-2973-to-8.2
[Backport 8.2] Database: update to EPSG v10.041
Diffstat (limited to 'scripts/build_db.py')
-rwxr-xr-xscripts/build_db.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/build_db.py b/scripts/build_db.py
index f1920c6d..263756c9 100755
--- a/scripts/build_db.py
+++ b/scripts/build_db.py
@@ -278,7 +278,9 @@ def fill_geodetic_crs(proj_db_cursor):
#proj_db_cursor.execute(
# "INSERT INTO crs SELECT ?, coord_ref_sys_code, coord_ref_sys_kind FROM epsg.epsg_coordinatereferencesystem WHERE coord_ref_sys_kind IN ('geographic 2D', 'geographic 3D', 'geocentric') AND datum_code IS NOT NULL", (EPSG_AUTHORITY,))
- proj_db_cursor.execute("INSERT INTO geodetic_crs SELECT ?, coord_ref_sys_code, coord_ref_sys_name, NULL, coord_ref_sys_kind, ?, coord_sys_code, ?, datum_code, NULL, deprecated FROM epsg.epsg_coordinatereferencesystem WHERE coord_ref_sys_kind IN ('geographic 2D', 'geographic 3D', 'geocentric') AND datum_code IS NOT NULL", (EPSG_AUTHORITY, EPSG_AUTHORITY, EPSG_AUTHORITY))
+ # There are a few deprecated records of code 61 000 000 that we have never imported in versions <= 10.039 because
+ # they lacked a datum code. We will continue to ignore them.
+ proj_db_cursor.execute("INSERT INTO geodetic_crs SELECT ?, coord_ref_sys_code, coord_ref_sys_name, NULL, coord_ref_sys_kind, ?, coord_sys_code, ?, datum_code, NULL, deprecated FROM epsg.epsg_coordinatereferencesystem WHERE coord_ref_sys_kind IN ('geographic 2D', 'geographic 3D', 'geocentric') AND datum_code IS NOT NULL AND NOT (coord_ref_sys_code > 61000000 AND deprecated)", (EPSG_AUTHORITY, EPSG_AUTHORITY, EPSG_AUTHORITY))
def fill_vertical_crs(proj_db_cursor):