aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNyall Dawson <nyall.dawson@gmail.com>2022-01-24 12:21:26 +1000
committerNyall Dawson <nyall.dawson@gmail.com>2022-01-24 12:21:26 +1000
commit5946b282628d372f5558c320f14a1c1395344e9c (patch)
treed4248b0cd3d3b0def9efff3ef1201e65f8df8ef3 /scripts
parentb258bedfdfd0ff31d96c60d55e66452fd49cb4aa (diff)
downloadPROJ-5946b282628d372f5558c320f14a1c1395344e9c.tar.gz
PROJ-5946b282628d372f5558c320f14a1c1395344e9c.zip
[esri] Add special case when importing ESRI:102113
See https://github.com/OSGeo/PROJ/pull/2954#issuecomment-977771912 for rationale
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build_db_from_esri.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/build_db_from_esri.py b/scripts/build_db_from_esri.py
index 75b64fe0..aaf975fb 100755
--- a/scripts/build_db_from_esri.py
+++ b/scripts/build_db_from_esri.py
@@ -1007,6 +1007,12 @@ class ConversionMapping:
param_mapping: Dict[int, str]
+# special cases
+
+REQUIRES_ORIGINAL_WKT_DEF = {
+ '102113' # see https://github.com/OSGeo/PROJ/pull/2954#issuecomment-977771912 for rationale
+}
+
MAPPED_PROJCS: Dict[str, ConversionMapping] = {
'Hotine_Oblique_Mercator_Azimuth_Natural_Origin': ConversionMapping(
epsg_code='9812',
@@ -1373,7 +1379,7 @@ def import_projcs():
sql = """INSERT INTO "usage" VALUES('ESRI', 'PCRS_%s_USAGE','projected_crs','ESRI','%s','%s','%s','%s','%s');""" % (code, code, extent_auth_name, extent_code, 'EPSG', '1024')
all_sql.append(sql)
- elif method in MAPPED_PROJCS or method in MAPPED_PROJCS_WITH_EXTRA_LOGIC:
+ elif (method in MAPPED_PROJCS or method in MAPPED_PROJCS_WITH_EXTRA_LOGIC) and code not in REQUIRES_ORIGINAL_WKT_DEF:
params = get_parameter_values(parsed_conv_wkt2['CONVERSION'][1])
cs = get_cs_from_false_easting_and_northing(params)
if method in MAPPED_PROJCS: