diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-10-22 19:30:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-22 19:30:00 +0200 |
| commit | 9aed9e0297ee049dfc92fe1dadc94302fcc44ca0 (patch) | |
| tree | 575906715503681d53e4f84e0ff28d31da2f6c89 /data | |
| parent | 01d503cb23b4cffe4435c1e915c4d0661bb16d74 (diff) | |
| parent | f5aed82fc6eee896606e95dc15e578cd9f058a2c (diff) | |
| download | PROJ-9aed9e0297ee049dfc92fe1dadc94302fcc44ca0.tar.gz PROJ-9aed9e0297ee049dfc92fe1dadc94302fcc44ca0.zip | |
Merge pull request #2907 from josch/tinshiftfallback
add fallback strategy for tinshift transform to use closest triangle for points not in any
Diffstat (limited to 'data')
| -rw-r--r-- | data/Makefile.am | 2 | ||||
| -rw-r--r-- | data/tests/tinshift_fallback_nearest_centroid.json | 17 | ||||
| -rw-r--r-- | data/tests/tinshift_fallback_nearest_side.json | 15 | ||||
| -rw-r--r-- | data/triangulation.schema.json | 10 |
4 files changed, 43 insertions, 1 deletions
diff --git a/data/Makefile.am b/data/Makefile.am index 4990c45c..2e6f7ae0 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -129,6 +129,8 @@ EXTRA_DIST = proj.ini GL27 nad.lst nad27 nad83 \ tests/tinshift_crs_implicit.json \ tests/tinshift_simplified_kkj_etrs.json \ tests/tinshift_simplified_n60_n2000.json \ + tests/tinshift_fallback_nearest_side.json \ + tests/tinshift_fallback_nearest_centroid.json \ generate_proj_db.cmake sql_filelist.cmake \ $(SQL_ORDERED_LIST) diff --git a/data/tests/tinshift_fallback_nearest_centroid.json b/data/tests/tinshift_fallback_nearest_centroid.json new file mode 100644 index 00000000..9751ab51 --- /dev/null +++ b/data/tests/tinshift_fallback_nearest_centroid.json @@ -0,0 +1,17 @@ +{ + "file_type": "triangulation_file", + "format_version": "1.1", + "fallback_strategy": "nearest_centroid", + "transformed_components": [ "horizontal" ], + "vertices_columns": [ "source_x", "source_y", "target_x", "target_y" ], + "triangles_columns": [ "idx_vertex1", "idx_vertex2", "idx_vertex3" ], + "vertices": [ + [0, 0, 0, 0], + [1, 0, 1, 0], + [1, 1, 1, 1], + [4, 0, 100, 0], + [100, 0, 100, 1], + [100, 1, 4, 0] + ], + "triangles": [ [0, 1, 2], [3, 4, 5] ] +} diff --git a/data/tests/tinshift_fallback_nearest_side.json b/data/tests/tinshift_fallback_nearest_side.json new file mode 100644 index 00000000..59e5b6f2 --- /dev/null +++ b/data/tests/tinshift_fallback_nearest_side.json @@ -0,0 +1,15 @@ +{ + "file_type": "triangulation_file", + "format_version": "1.1", + "fallback_strategy": "nearest_side", + "transformed_components": [ "horizontal" ], + "vertices_columns": [ "source_x", "source_y", "target_x", "target_y" ], + "triangles_columns": [ "idx_vertex1", "idx_vertex2", "idx_vertex3" ], + "vertices": [ + [0, 0, 0, 0], + [1, 0, 2, 0], + [1, 1, 2, 2], + [0, 1, 0, 2] + ], + "triangles": [ [0, 1, 2], [0, 2, 3] ] +} diff --git a/data/triangulation.schema.json b/data/triangulation.schema.json index d3f8004d..8203f5d9 100644 --- a/data/triangulation.schema.json +++ b/data/triangulation.schema.json @@ -13,7 +13,7 @@ "format_version": { "type": "string", "enum": [ - "1.0" + "1.0", "1.1" ] }, "name": { @@ -28,6 +28,14 @@ "$ref": "#/definitions/datetime", "description": "The date on which this version of the triangulation was published (or possibly the date on which it takes effect?)" }, + "fallback_strategy": { + "type": "string", + "enum": [ + "none", + "nearest_side", + "nearest_centroid" + ] + }, "license": { "type": "string", "description": "License under which the file is published" |
