diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-09-28 10:19:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-28 10:19:50 +0200 |
| commit | f0c148abf30201fef9f9958d4e47c5a28d9e66b0 (patch) | |
| tree | 875390985d2705928fe52658b156ccdcb60fecba /scripts | |
| parent | b0b21db45f0dc32c33e1e6c45ab1fe5cc1a4f3df (diff) | |
| parent | 9ddf2d4cedc43840ab92ebda6040a78b1c774f81 (diff) | |
| download | PROJ-f0c148abf30201fef9f9958d4e47c5a28d9e66b0.tar.gz PROJ-f0c148abf30201fef9f9958d4e47c5a28d9e66b0.zip | |
Merge pull request #1636 from OSGeo/backport-1633-to-6.2
Backport #1633 to 6.2
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 |
