diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-10-27 20:59:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-27 20:59:29 +0100 |
| commit | e2d5b13f3442a8e88093a9d68e1be550194a4d77 (patch) | |
| tree | 31789cfd11ea72eb9e5fc07eb2b2ac0839cfd5fd /scripts/build_db_create_ignf_from_xml.py | |
| parent | e7dff6e3a9895af20b3d02337299d5f05c2ea4bc (diff) | |
| parent | 46c6ddf84defeb4ae855285da4416dff7178cacc (diff) | |
| download | PROJ-e2d5b13f3442a8e88093a9d68e1be550194a4d77.tar.gz PROJ-e2d5b13f3442a8e88093a9d68e1be550194a4d77.zip | |
Merge pull request #1696 from rouault/modify_concatenated_operation_structure
Database: add an auxiliary concatenated_operation_step table to allow arbitrary number of steps (fixes #1632)
Diffstat (limited to 'scripts/build_db_create_ignf_from_xml.py')
| -rwxr-xr-x | scripts/build_db_create_ignf_from_xml.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/build_db_create_ignf_from_xml.py b/scripts/build_db_create_ignf_from_xml.py index b797477f..33302bc3 100755 --- a/scripts/build_db_create_ignf_from_xml.py +++ b/scripts/build_db_create_ignf_from_xml.py @@ -504,7 +504,7 @@ for node in root.iterfind('.//Transformation'): print('Fixing URL of ' + filename + ' to ' + mapGridURLs[filename]) filename = mapGridURLs[filename] - if not filename.endswith('RAF09.mnt'): # no longer available + if not filename.endswith('RAF09.mnt') and not filename.endswith('ggspm06v1.mnt'): # no longer available r = requests.head(filename, allow_redirects = True ) if r.status_code not in (200, 302): assert False, (r.status_code, id, name, filename) @@ -693,7 +693,13 @@ for node in root.iterfind('.//Transformation'): #sql = """INSERT INTO "coordinate_operation" VALUES('IGNF','%s','concatenated_operation');""" % (id_concat) #all_sql_concat.append(sql) - sql = """INSERT INTO "concatenated_operation" VALUES('IGNF','%s','Nouvelle Triangulation Francaise Paris grades to %s',NULL,'%s','IGNF','%s','%s','%s','%s','%s',NULL,'IGNF','%s','IGNF','%s',NULL,NULL,'%s',0);""" % (id_concat, target[1], scope, NTFPalias, target[0], target[1], area_of_use[0], area_of_use[1], idFirstOp, id_geog, operation_version) + sql = """INSERT INTO "concatenated_operation" VALUES('IGNF','%s','Nouvelle Triangulation Francaise Paris grades to %s',NULL,'%s','IGNF','%s','%s','%s','%s','%s',NULL,'%s',0);""" % (id_concat, target[1], scope, NTFPalias, target[0], target[1], area_of_use[0], area_of_use[1], operation_version) + all_sql_concat.append(sql) + + sql = """INSERT INTO "concatenated_operation_step" VALUES('IGNF','%s',1,'IGNF','%s');""" % (id_concat, idFirstOp) + all_sql_concat.append(sql) + + sql = """INSERT INTO "concatenated_operation_step" VALUES('IGNF','%s',2,'IGNF','%s');""" % (id_concat, id_geog) all_sql_concat.append(sql) |
