aboutsummaryrefslogtreecommitdiff
path: root/scripts/build_db_from_esri.py
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-03-18 12:15:03 +0100
committerEven Rouault <even.rouault@spatialys.com>2019-03-18 12:16:00 +0100
commit06d7f93ad3a862abca8a404de05fd655a8bc797c (patch)
treeacc24a9644f3442aeee5f12a5396912ca103f094 /scripts/build_db_from_esri.py
parent8cf492acb3840eff5064a2da421c143e1fd1646c (diff)
downloadPROJ-06d7f93ad3a862abca8a404de05fd655a8bc797c.tar.gz
PROJ-06d7f93ad3a862abca8a404de05fd655a8bc797c.zip
Database: fix import of deprecated ellipsoid and geodetic_datum from ESRI database
Diffstat (limited to 'scripts/build_db_from_esri.py')
-rwxr-xr-xscripts/build_db_from_esri.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/build_db_from_esri.py b/scripts/build_db_from_esri.py
index 4f89f59f..eb02feb6 100755
--- a/scripts/build_db_from_esri.py
+++ b/scripts/build_db_from_esri.py
@@ -247,7 +247,7 @@ def import_spheroid():
deprecated = 1 if row[idx_deprecated] == 'yes' else 0
map_spheroid_esri_name_to_auth_code[esri_name] = [
- 'ESRI', latestWkid]
+ 'ESRI', code]
if abs(float(a) - 6375000) > 0.01 * 6375000:
pos = esri_name.find('_19')
@@ -267,7 +267,7 @@ def import_spheroid():
body_code = 'EARTH'
sql = """INSERT INTO ellipsoid VALUES('ESRI','%s','%s','%s','%s','%s',%s,'EPSG','9001',%s,NULL,%d);""" % (
- latestWkid, esri_name, description, body_auth, body_code, a, rf, deprecated)
+ code, esri_name, description, body_auth, body_code, a, rf, deprecated)
all_sql.append(sql)
########################
@@ -341,10 +341,10 @@ def import_prime_meridian():
deprecated = 1 if row[idx_deprecated] == 'yes' else 0
- map_pm_esri_name_to_auth_code[esri_name] = ['ESRI', latestWkid]
+ map_pm_esri_name_to_auth_code[esri_name] = ['ESRI', code]
sql = """INSERT INTO "prime_meridian" VALUES('ESRI','%s','%s',%s,'EPSG','9110',%d);""" % (
- latestWkid, esri_name, value, deprecated)
+ code, esri_name, value, deprecated)
all_sql.append(sql)
@@ -411,7 +411,7 @@ def import_datum():
assert authority.upper() == 'ESRI', row
map_datum_esri_name_to_auth_code[esri_name] = [
- 'ESRI', latestWkid]
+ 'ESRI', code]
wkt = row[idx_wkt]
pos = wkt.find('SPHEROID["')
@@ -429,7 +429,7 @@ def import_datum():
description = row[idx_description]
deprecated = 1 if row[idx_deprecated] == 'yes' else 0
- map_datum_esri_to_parameters[latestWkid] = {
+ map_datum_esri_to_parameters[code] = {
'esri_name': esri_name,
'description': description,
'ellps_auth_name': ellps_auth_name,