Skip to content

Commit

Permalink
Merge pull request #2850 from rouault/projjson_0_4
Browse files Browse the repository at this point in the history
PROJJSON: support additional properties allowed in id object (version, authority_citation, uri) for parity with WKT2:2019
  • Loading branch information
rouault authored Sep 14, 2021
2 parents 92ca1a9 + bca0a82 commit 47fb85b
Show file tree
Hide file tree
Showing 14 changed files with 1,161 additions and 41 deletions.
11 changes: 8 additions & 3 deletions data/projjson.schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "https://proj.org/schemas/v0.3/projjson.schema.json",
"$id": "https://proj.org/schemas/v0.4/projjson.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Schema for PROJJSON (v0.3)",
"description": "Schema for PROJJSON (v0.4)",
"$comment": "This file exists both in data/ and in schemas/vXXX/. Keep both in sync. And if changing the value of $id, change PROJJSON_CURRENT_VERSION accordingly in io.cpp",

"oneOf": [
Expand Down Expand Up @@ -612,7 +612,12 @@
"authority": { "type": "string" },
"code": {
"oneOf": [ { "type": "string" }, { "type": "integer" } ]
}
},
"version": {
"oneOf": [ { "type": "string" }, { "type": "number" } ]
},
"authority_citation": { "type": "string" },
"uri": { "type": "string" }
},
"required" : [ "authority", "code" ],
"additionalProperties": false
Expand Down
2 changes: 1 addition & 1 deletion docs/source/apps/cct.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ by :c:func:`proj_create`, provided it expresses a coordinate operation
uniqueness is not guaranteed, heuristics are applied to determine the appropriate best match.
- a OGC URN combining references for concatenated operations
(e.g. "urn:ogc:def:coordinateOperation,coordinateOperation:EPSG::3895,coordinateOperation:EPSG::1618")
- a PROJJSON string. The jsonschema is at https://proj.org/schemas/v0.3/projjson.schema.json
- a PROJJSON string. The jsonschema is at https://proj.org/schemas/v0.4/projjson.schema.json

.. versionadded:: 8.0.0

Expand Down
2 changes: 1 addition & 1 deletion docs/source/apps/cs2cs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Synopsis
(*added in 6.2*)
- a OGC URN combining references for concatenated operations
(e.g. "urn:ogc:def:coordinateOperation,coordinateOperation:EPSG::3895,coordinateOperation:EPSG::1618")
- a PROJJSON string. The jsonschema is at https://proj.org/schemas/v0.3/projjson.schema.json (*added in 6.2*)
- a PROJJSON string. The jsonschema is at https://proj.org/schemas/v0.4/projjson.schema.json (*added in 6.2*)
- a compound CRS made from two object names separated with " + ". e.g. "WGS 84 + EGM96 height" (*added in 7.1*)

.. versionadded:: 6.0.0
Expand Down
2 changes: 1 addition & 1 deletion docs/source/apps/projinfo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Synopsis
(*added in 6.2*)
- a OGC URN combining references for concatenated operations
(e.g. "urn:ogc:def:coordinateOperation,coordinateOperation:EPSG::3895,coordinateOperation:EPSG::1618")
- a PROJJSON string. The jsonschema is at https://proj.org/schemas/v0.3/projjson.schema.json (*added in 6.2*)
- a PROJJSON string. The jsonschema is at https://proj.org/schemas/v0.4/projjson.schema.json (*added in 6.2*)
- a compound CRS made from two object names separated with " + ". e.g. "WGS 84 + EGM96 height" (*added in 7.1*)

{object_reference} is a filename preceded by the '@' character. The
Expand Down
2 changes: 1 addition & 1 deletion docs/source/development/reference/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ paragraph for more details.
syntax "EPSG:2393+5717"),
- a OGC URN combining references for concatenated operations
(e.g. "urn:ogc:def:coordinateOperation,coordinateOperation:EPSG::3895,coordinateOperation:EPSG::1618")
- a PROJJSON string. The jsonschema is at https://proj.org/schemas/v0.3/projjson.schema.json (*added in 6.2*)
- a PROJJSON string. The jsonschema is at https://proj.org/schemas/v0.4/projjson.schema.json (*added in 6.2*)
- a compound CRS made from two object names separated with " + ". e.g. "WGS 84 + EGM96 height" (*added in 7.1*)
Example call:
Expand Down
5 changes: 3 additions & 2 deletions docs/source/specifications/projjson.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ the same as WKT2:2019.

PROJJSON is available as input and output of PROJ since PROJ 6.2.

The current version is 0.3.
The current version is 0.4.

Schema
------

A JSON schema of its grammar is available at
https://proj.org/schemas/v0.3/projjson.schema.json
https://proj.org/schemas/v0.4/projjson.schema.json

History
-------

* v0.4: additional properties allowed in id object (version, authority_citation, uri)
* v0.3: additional properties allowed in BoundCRS object (name, scope, area, bbox, usages, remarks, id, ids)
* v0.2: addition of geoid_model in VerticalCRS object.
* v0.1: initial version for PROJ 6.2
Expand Down
3 changes: 1 addition & 2 deletions include/proj/io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,7 @@ class PROJ_GCC_DLL JSONFormatter {
PROJ_INTERNAL bool
outputUsage(bool calledBeforeObjectContext = false) const;

PROJ_INTERNAL static const char *PROJJSON_v0_2;
PROJ_INTERNAL static const char *PROJJSON_v0_3;
PROJ_INTERNAL static const char *PROJJSON_v0_4;

//! @endcond

Expand Down
Loading

0 comments on commit 47fb85b

Please sign in to comment.