diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-09-23 15:03:56 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-09-23 15:03:56 +0200 |
| commit | 841673c8a39613424cc8345e8e160a811c14b5be (patch) | |
| tree | f541157e95c71a7a5a98af8f8eea7756fc2c6c3d /scripts | |
| parent | a71fce63c2d77b6709005667efd577d728b900e9 (diff) | |
| download | PROJ-841673c8a39613424cc8345e8e160a811c14b5be.tar.gz PROJ-841673c8a39613424cc8345e8e160a811c14b5be.zip | |
Database: update to EPSG 9.8.2
With limitation of https://github.com/OSGeo/PROJ/issues/1632 regarding
concatenated operations with more than 3 steps.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/build_db.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/build_db.py b/scripts/build_db.py index 295a555d..bf3ddc0a 100755 --- a/scripts/build_db.py +++ b/scripts/build_db.py @@ -476,6 +476,15 @@ def fill_concatenated_operation(proj_db_cursor): max_n_params = 3 step_code = [None for i in range(max_n_params)] + proj_db_cursor.execute("SELECT COUNT(*) FROM epsg_coordoperationpath WHERE concat_operation_code = ?", (code,)) + (nsteps, ) = proj_db_cursor.fetchone() + # Our database model has only provision for up to 3 steps currently. + # As of EPSG v9.8.2, only EPSG:9103 (NAD27 to ITRF2014 (1)) and 9104 (NAD27 to ITRF2014 (2)) have respectively 4 and 7 steps. + # Tracked as https://github.com/OSGeo/PROJ/issues/1632 + if nsteps > 3: + print('Cannot import concatenated_operation ' + str(code) + ', as it has more than 3 steps.') + continue + iterator = proj_db_cursor.execute("SELECT op_path_step, single_operation_code FROM epsg_coordoperationpath WHERE concat_operation_code = ? ORDER BY op_path_step", (code,)) for (order, single_operation_code) in iterator: assert order <= max_n_params |
