diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2022-02-21 16:37:52 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-21 16:37:52 +0100 |
| commit | 0bcdaae07d17f1f7b2df4b56523c8902a76de858 (patch) | |
| tree | a210d9c7bdb0677d390a4de95f77801683ff3b21 /scripts/build_db_from_esri.py | |
| parent | 906edb9584efcffc4c4572325dc93f8330c39e28 (diff) | |
| parent | ca8b9072891064876fc6d4cb7bb9a5ce7169658a (diff) | |
| download | PROJ-0bcdaae07d17f1f7b2df4b56523c8902a76de858.tar.gz PROJ-0bcdaae07d17f1f7b2df4b56523c8902a76de858.zip | |
Merge pull request #3068 from rouault/db_esri_transformation_alias_name
Database: insert entries in the alias_name for ESRI transformations that match a EPSG entry
Diffstat (limited to 'scripts/build_db_from_esri.py')
| -rwxr-xr-x | scripts/build_db_from_esri.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/build_db_from_esri.py b/scripts/build_db_from_esri.py index aaf975fb..72b07400 100755 --- a/scripts/build_db_from_esri.py +++ b/scripts/build_db_from_esri.py @@ -1886,7 +1886,7 @@ def import_geogtran(): 'EPSG', wkid] cursor.execute( - "SELECT name FROM coordinate_operation_view WHERE auth_name = 'EPSG' AND code = ?", (wkid,)) + "SELECT name, table_name FROM coordinate_operation_view WHERE auth_name = 'EPSG' AND code = ?", (wkid,)) src_row = cursor.fetchone() if not src_row: @@ -1897,9 +1897,13 @@ def import_geogtran(): print('Skipping NADCON5 %s (EPSG source) since it uses a non-supported yet suported method' % esri_name) continue - # Don't do anything particular except checking we know it assert src_row, row + _, table_name = src_row + # Insert alias + sql = f"INSERT INTO \"alias_name\" VALUES('{table_name}','EPSG',{wkid},'{esri_name}','ESRI');" + all_sql.append(sql) + else: # We don't want to import ESRI deprecated transformations |
