aboutsummaryrefslogtreecommitdiff
path: root/scripts/build_db_from_esri.py
diff options
context:
space:
mode:
authorNyall Dawson <nyall.dawson@gmail.com>2021-11-16 16:00:07 +1000
committerNyall Dawson <nyall.dawson@gmail.com>2021-11-16 16:00:07 +1000
commitd980257b8e3f5180f346fbb7c4c273bbacca0cc9 (patch)
treed67c4088c4bd8e57ec866cd46a2008f5a6d77493 /scripts/build_db_from_esri.py
parentee17e57a1774ab2912cca668b27167654be384a4 (diff)
downloadPROJ-d980257b8e3f5180f346fbb7c4c273bbacca0cc9.tar.gz
PROJ-d980257b8e3f5180f346fbb7c4c273bbacca0cc9.zip
Force conversion of Unity units to Years for epochs in esri projection engine db
Diffstat (limited to 'scripts/build_db_from_esri.py')
-rwxr-xr-xscripts/build_db_from_esri.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/build_db_from_esri.py b/scripts/build_db_from_esri.py
index b2d80524..82bb196a 100755
--- a/scripts/build_db_from_esri.py
+++ b/scripts/build_db_from_esri.py
@@ -2140,6 +2140,10 @@ def import_geogtran():
reference_time = parsed_wkt2['COORDINATEOPERATION'][1]['Reference_Time'][0]
reference_time_cs_auth, reference_time_cs_code, reference_time_uom_code = get_cs_from_unit(
*parsed_wkt2['COORDINATEOPERATION'][1]['Reference_Time'][1]['SCALEUNIT'])
+ if reference_time_cs_auth == 'EPSG' and reference_time_uom_code == '9201':
+ # convert "Unity" values for Reference_Time to "years". The helmert_transformation table requires
+ # a time type uom for epochs
+ reference_time_uom_code = '1029'
if is_Time_Based_Helmert_Coordinate_Frame:
method_code = '1057'