aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-07-01 14:09:02 +0200
committerEven Rouault <even.rouault@spatialys.com>2020-09-30 11:26:48 +0200
commit164c85cc8e7f4515c7c4da7a85fe75c4a21fafec (patch)
treea1400324adefc7d79488ed0fd661b0060c86490a /data
parentef48acb4ab6e3426ac66f37a6477521d7b7be6d3 (diff)
downloadPROJ-164c85cc8e7f4515c7c4da7a85fe75c4a21fafec.tar.gz
PROJ-164c85cc8e7f4515c7c4da7a85fe75c4a21fafec.zip
Add a +proj=tinshift for triangulation-based transformations
Implements RFC-6
Diffstat (limited to 'data')
-rw-r--r--data/Makefile.am7
-rw-r--r--data/tests/tinshift_crs_implicit.json46
-rw-r--r--data/tests/tinshift_simplified_kkj_etrs.json50
-rw-r--r--data/tests/tinshift_simplified_n60_n2000.json50
-rw-r--r--data/triangulation.schema.json169
5 files changed, 321 insertions, 1 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index b48f53fa..bdfabe0f 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -4,7 +4,8 @@ pkgdata_DATA = proj.ini GL27 nad.lst nad27 nad83 world other.extra \
CH \
ITRF2000 ITRF2008 ITRF2014 proj.db \
projjson.schema.json \
- deformation_model.schema.json
+ deformation_model.schema.json \
+ triangulation.schema.json
SQL_ORDERED_LIST = sql/begin.sql \
sql/proj_db_table_defs.sql \
@@ -45,6 +46,7 @@ EXTRA_DIST = proj.ini GL27 nad.lst nad27 nad83 \
ITRF2000 ITRF2008 ITRF2014 \
projjson.schema.json \
deformation_model.schema.json \
+ triangulation.schema.json \
CMakeLists.txt \
tests/test_nodata.gtx \
tests/test_vgrid_bigendian_bigtiff.tif \
@@ -116,6 +118,9 @@ EXTRA_DIST = proj.ini GL27 nad.lst nad27 nad83 \
tests/simple_model_wrap_west.json \
tests/simple_model_wrap_west.tif \
tests/simple_model_projected.json \
+ tests/tinshift_crs_implicit.json \
+ tests/tinshift_simplified_kkj_etrs.json \
+ tests/tinshift_simplified_n60_n2000.json \
generate_all_sql_in.cmake sql_filelist.cmake \
$(SQL_ORDERED_LIST)
diff --git a/data/tests/tinshift_crs_implicit.json b/data/tests/tinshift_crs_implicit.json
new file mode 100644
index 00000000..e1939fd0
--- /dev/null
+++ b/data/tests/tinshift_crs_implicit.json
@@ -0,0 +1,46 @@
+{
+ "file_type": "triangulation_file",
+ "format_version": "1.0",
+ "name": "Name",
+ "version": "Version",
+ "publication_date": "2018-07-01T00:00:00Z",
+ "license": "Creative Commons Attribution 4.0 International",
+ "description": "Test triangulation",
+ "authority": {
+ "name": "Authority name",
+ "url": "http://example.com",
+ "address": "Adress",
+ "email": "test@example.com"
+ },
+ "links": [
+ {
+ "href": "https://example.com/about.html",
+ "rel": "about",
+ "type": "text/html",
+ "title": "About"
+ },
+ {
+ "href": "https://example.com/download",
+ "rel": "source",
+ "type": "application/zip",
+ "title": "Authoritative source"
+ },
+ {
+ "href": "https://creativecommons.org/licenses/by/4.0/",
+ "rel": "license",
+ "type": "text/html",
+ "title": "Creative Commons Attribution 4.0 International license"
+ },
+ {
+ "href": "https://example.com/metadata.xml",
+ "rel": "metadata",
+ "type": "application/xml",
+ "title": " ISO 19115 XML encoded metadata regarding the deformation model"
+ }
+ ],
+ "transformed_components": [ "horizontal" ],
+ "vertices_columns": [ "source_x", "source_y", "target_x", "target_y" ],
+ "triangles_columns": [ "idx_vertex1", "idx_vertex2", "idx_vertex3" ],
+ "vertices": [ [2,49,2.1,49.1], [3,50,3.1,50.1], [2, 50, 2.1,50.1] ],
+ "triangles": [ [0, 1, 2] ]
+}
diff --git a/data/tests/tinshift_simplified_kkj_etrs.json b/data/tests/tinshift_simplified_kkj_etrs.json
new file mode 100644
index 00000000..7d46107f
--- /dev/null
+++ b/data/tests/tinshift_simplified_kkj_etrs.json
@@ -0,0 +1,50 @@
+{
+ "file_type": "triangulation_file",
+ "format_version": "1.0",
+ "name": "Name",
+ "version": "Version",
+ "publication_date": "2018-07-01T00:00:00Z",
+ "license": "Creative Commons Attribution 4.0 International",
+ "description": "Test triangulation",
+ "authority": {
+ "name": "Authority name",
+ "url": "http://example.com",
+ "address": "Adress",
+ "email": "test@example.com"
+ },
+ "links": [
+ {
+ "href": "https://example.com/about.html",
+ "rel": "about",
+ "type": "text/html",
+ "title": "About"
+ },
+ {
+ "href": "https://example.com/download",
+ "rel": "source",
+ "type": "application/zip",
+ "title": "Authoritative source"
+ },
+ {
+ "href": "https://creativecommons.org/licenses/by/4.0/",
+ "rel": "license",
+ "type": "text/html",
+ "title": "Creative Commons Attribution 4.0 International license"
+ },
+ {
+ "href": "https://example.com/metadata.xml",
+ "rel": "metadata",
+ "type": "application/xml",
+ "title": " ISO 19115 XML encoded metadata regarding the triangulation"
+ }
+ ],
+ "input_crs": "EPSG:2393",
+ "output_crs": "EPSG:3067",
+ "transformed_components": [ "horizontal" ],
+ "vertices_columns": [ "source_x", "source_y", "target_x", "target_y" ],
+ "triangles_columns": [ "idx_vertex1", "idx_vertex2", "idx_vertex3" ],
+ "vertices": [ [3244102.707, 6693710.937, 244037.137, 6690900.686],
+ [3205290.722, 6715311.822, 205240.895, 6712492.577],
+ [3218328.492, 6649538.429, 218273.648, 6646745.973] ],
+ "triangles": [ [0, 1, 2] ]
+}
diff --git a/data/tests/tinshift_simplified_n60_n2000.json b/data/tests/tinshift_simplified_n60_n2000.json
new file mode 100644
index 00000000..f6d3d4aa
--- /dev/null
+++ b/data/tests/tinshift_simplified_n60_n2000.json
@@ -0,0 +1,50 @@
+{
+ "file_type": "triangulation_file",
+ "format_version": "1.0",
+ "name": "Name",
+ "version": "Version",
+ "publication_date": "2018-07-01T00:00:00Z",
+ "license": "Creative Commons Attribution 4.0 International",
+ "description": "Test triangulation",
+ "authority": {
+ "name": "Authority name",
+ "url": "http://example.com",
+ "address": "Adress",
+ "email": "test@example.com"
+ },
+ "links": [
+ {
+ "href": "https://example.com/about.html",
+ "rel": "about",
+ "type": "text/html",
+ "title": "About"
+ },
+ {
+ "href": "https://example.com/download",
+ "rel": "source",
+ "type": "application/zip",
+ "title": "Authoritative source"
+ },
+ {
+ "href": "https://creativecommons.org/licenses/by/4.0/",
+ "rel": "license",
+ "type": "text/html",
+ "title": "Creative Commons Attribution 4.0 International license"
+ },
+ {
+ "href": "https://example.com/metadata.xml",
+ "rel": "metadata",
+ "type": "application/xml",
+ "title": " ISO 19115 XML encoded metadata regarding the tirangulation"
+ }
+ ],
+ "input_crs": "EPSG:2393+5717",
+ "output_crs": "EPSG:2393+5941",
+ "transformed_components": [ "vertical" ],
+ "vertices_columns": [ "source_x", "source_y", "source_z", "target_z" ],
+ "triangles_columns": [ "idx_vertex1", "idx_vertex2", "idx_vertex3" ],
+ "vertices": [ [3188607.0, 6688748.0, 23.123, 23.4133],
+ [3184981.0, 6725255.0, 8.044, 8.34499],
+ [3220912.0, 6699508.0, 1.724, 2.0101] ],
+ "triangles": [ [0, 1, 2] ]
+}
diff --git a/data/triangulation.schema.json b/data/triangulation.schema.json
new file mode 100644
index 00000000..ee5cae0c
--- /dev/null
+++ b/data/triangulation.schema.json
@@ -0,0 +1,169 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "description": "Schema for triangulation based transformation",
+ "type": "object",
+ "properties": {
+ "file_type": {
+ "type": "string",
+ "enum": [
+ "triangulation_file"
+ ],
+ "description": "File type. Always \"triangulation_file\""
+ },
+ "format_version": {
+ "type": "string",
+ "enum": [
+ "1.0"
+ ]
+ },
+ "name": {
+ "type": "string",
+ "description": "A brief descriptive name of the triangulation"
+ },
+ "version": {
+ "type": "string",
+ "description": "A string identifying the version of the triangulation. The format for specifying version will be defined by the agency responsible for the triangulation"
+ },
+ "publication_date": {
+ "$ref": "#/definitions/datetime",
+ "description": "The date on which this version of the triangulation was published (or possibly the date on which it takes effect?)"
+ },
+ "license": {
+ "type": "string",
+ "description": "License under which the file is published"
+ },
+ "description": {
+ "type": "string",
+ "description": "A text description of the file"
+ },
+ "authority": {
+ "type": "object",
+ "description": "Basic information about the agency responsible for the data set",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the agency"
+ },
+ "url": {
+ "type": "string",
+ "description": "The url of the agency website",
+ "format": "uri"
+ },
+ "address": {
+ "type": "string",
+ "description": "The postal address of the agency"
+ },
+ "email": {
+ "type": "string",
+ "description": "An email contact address for the agency",
+ "format": "email"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "links": {
+ "type": "array",
+ "description": "Links to related information",
+ "items": {
+ "type": "object",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "The URL holding the information",
+ "format": "uri"
+ },
+ "rel": {
+ "type": "string",
+ "description": "The relationship to the dataset. Proposed relationships are:\n- \"about\": a web page for human consumption describing the model\n- \"source\": the authoritative source data from which the triangulation is built.\n- \"metadata\": ISO 19115 XML metadata regarding the triangulation."
+ },
+ "type": {
+ "type": "string",
+ "description": "MIME type"
+ },
+ "title": {
+ "type": "string",
+ "description": "Description of the link"
+ }
+ },
+ "required": [
+ "href"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "input_crs": {
+ "$ref": "#/definitions/crs",
+ "description": "String identifying the CRS of source coordinates in the vertices. Typically \"EPSG:XXXX\". If the transformation is for vertical component, this should be the code for a compound CRS (can be EPSG:XXXX+YYYY where XXXX is the code of the horizontal CRS and YYYY the code of the vertical CRS). For example, for the KKJ->ETRS89 transformation, this is EPSG:2393 (\"KKJ / Finland Uniform Coordinate System\"). The input coordinates are assumed to be passed in the \"normalized for visualisation\" / \"GIS friendly\" order, that is longitude, latitude for geographic coordinates and easting, northing for projected coordinates."
+ },
+ "output_crs": {
+ "$ref": "#/definitions/crs",
+ "description": "String identifying the CRS of target coordinates in the vertices. Typically \"EPSG:XXXX\". If the transformation is for vertical component, this should be the code for a compound CRS (can be EPSG:XXXX+YYYY where XXXX is the code of the horizontal CRS and YYYY the code of the vertical CRS). For example, for the KKJ->ETRS89 transformation, this is EPSG:3067 (\"ETRS89 / TM35FIN(E,N)\"). The output coordinates will be returned in the \"normalized for visualisation\" / \"GIS friendly\" order, that is easting, that is longitude, latitude for geographic coordinates and easting, northing for projected coordinates."
+ },
+ "transformed_components": {
+ "type": "array",
+ "description": "Specify which component of the coordinates are transformed. Either \"horizontal\", \"vertical\" or both",
+ "minItems": 1,
+ "maxItems": 2,
+ "items": {
+ "type": "string",
+ "enum": [
+ "horizontal",
+ "vertical"
+ ]
+ }
+ },
+ "vertices_columns": {
+ "type": "array",
+ "description": "Specify the name of the columns of the rows in the \"vertices\" array. There must be exactly as many elements in \"vertices_columns\" as in a row of \"vertices\". The following names have a special meaning: \"source_x\", \"source_y\", \"target_x\", \"target_y\", \"source_z\", \"target_z\" and \"offset_z\". \"source_x\" and \"source_y\" are compulsory. \"source_x\" is for the source longitude (in degree) or easting. \"source_y\" is for the source latitude (in degree) or northing. \"target_x\" and \"target_y\" are compulsory when \"horizontal\" is specified in \"transformed_components\". (\"source_z\" and \"target_z\") or \"offset_z\" are compulsory when \"vertical\" is specified in \"transformed_components\".",
+ "minItems": 3,
+ "items": {
+ "type": "string"
+ }
+ },
+ "triangles_columns": {
+ "type": "array",
+ "description": "Specify the name of the columns of the rows in the \"triangles\" array. There must be exactly as many elements in \"triangles_columns\" as in a row of \"triangles\". The following names have a special meaning: \"idx_vertex1\", \"idx_vertex2\", \"idx_vertex3\". They are compulsory.",
+ "minItems": 3,
+ "items": {
+ "type": "string"
+ }
+ },
+ "vertices": {
+ "type": "array",
+ "description": "an array whose items are themselves arrays with as many columns as described in \"vertices_columns\"",
+ "items": {
+ "type": "array"
+ }
+ },
+ "triangles": {
+ "type": "array",
+ "description": "an array whose items are themselves arrays with as many columns as described in \"triangles_columns\". The value of the \"idx_vertexN\" columns must be indices (between 0 and len(\"vertices\"-1) of items of the \"vertices\" array",
+ "items": {
+ "type": "array"
+ }
+ }
+ },
+ "required": [
+ "file_type",
+ "format_version",
+ "transformed_components",
+ "vertices_columns",
+ "triangles_columns",
+ "vertices",
+ "triangles"
+ ],
+ "additionalProperties": false,
+ "definitions": {
+ "crs": {
+ "type": "string"
+ },
+ "datetime": {
+ "type": "string",
+ "format": "date-time",
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
+ }
+ }
+}