aboutsummaryrefslogtreecommitdiff
path: root/scripts/build_db_from_esri.py
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-04-22 15:43:17 +0200
committerEven Rouault <even.rouault@spatialys.com>2019-04-22 15:49:32 +0200
commit1f600ef06cc6e28afa0dd5cc520fd62af34ae3d9 (patch)
treef4b81e436b630006b6d46f137d4913d42c3afd70 /scripts/build_db_from_esri.py
parent1c677ed192125ddc0eb4b90b24b80d9820769dd0 (diff)
downloadPROJ-1f600ef06cc6e28afa0dd5cc520fd62af34ae3d9.tar.gz
PROJ-1f600ef06cc6e28afa0dd5cc520fd62af34ae3d9.zip
Database / ESRI: use EPSG ellipsoid when possible
Diffstat (limited to 'scripts/build_db_from_esri.py')
-rwxr-xr-xscripts/build_db_from_esri.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/build_db_from_esri.py b/scripts/build_db_from_esri.py
index 6de2eb85..69940798 100755
--- a/scripts/build_db_from_esri.py
+++ b/scripts/build_db_from_esri.py
@@ -246,8 +246,9 @@ def import_spheroid():
description = row[idx_description]
deprecated = 1 if row[idx_deprecated] == 'yes' else 0
- map_spheroid_esri_name_to_auth_code[esri_name] = [
- 'ESRI', code]
+ if esri_name not in map_spheroid_esri_name_to_auth_code:
+ map_spheroid_esri_name_to_auth_code[esri_name] = [
+ 'ESRI', code]
if abs(float(a) - 6375000) > 0.01 * 6375000:
pos = esri_name.find('_19')
@@ -341,7 +342,8 @@ def import_prime_meridian():
deprecated = 1 if row[idx_deprecated] == 'yes' else 0
- map_pm_esri_name_to_auth_code[esri_name] = ['ESRI', code]
+ if esri_name not in map_pm_esri_name_to_auth_code:
+ map_pm_esri_name_to_auth_code[esri_name] = ['ESRI', code]
sql = """INSERT INTO "prime_meridian" VALUES('ESRI','%s','%s',%s,'EPSG','9110',%d);""" % (
code, esri_name, value, deprecated)