-
Notifications
You must be signed in to change notification settings - Fork 791
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
294 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,291 @@ | ||
{ | ||
"$id": "https://proj.org/crsjson.schema.json", | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"description": "Schema for CRS JSON", | ||
|
||
"oneOf": [ | ||
{ "$ref": "#/definitions/crs" }, | ||
{ "$ref": "#/definitions/datum" }, | ||
{ "$ref": "#/definitions/ellipsoid" } | ||
], | ||
|
||
"definitions": { | ||
|
||
"axis": { | ||
"type": "object", | ||
"properties": { | ||
"type": { "type": "string", "enum": ["Axis"] }, | ||
"name": { "type": "string" }, | ||
"abbreviation": { "type": "string" }, | ||
"direction": { "type": "string" }, | ||
"unit": { "$ref": "#/definitions/unit" }, | ||
"id": { "$ref": "#/definitions/id" } | ||
}, | ||
"required" : [ "name" ], | ||
"additionalProperties": false | ||
}, | ||
|
||
"bbox": { | ||
"type": "object", | ||
"properties": { | ||
"east_longitude": { "type": "number" }, | ||
"west_longitude": { "type": "number" }, | ||
"south_latitude": { "type": "number" }, | ||
"north_latitude": { "type": "number" } | ||
}, | ||
"required" : [ "east_longitude", "west_longitude", | ||
"south_latitude", "north_latitude" ], | ||
"additionalProperties": false | ||
}, | ||
|
||
"conversion": { | ||
"type": "object", | ||
"properties": { | ||
"type": { "type": "string", "enum": ["Conversion"] }, | ||
"name": { "type": "string" }, | ||
"method": { "$ref": "#/definitions/method" }, | ||
"parameters": { | ||
"type": "array", | ||
"items": { "$ref": "#/definitions/parameter_value" } | ||
}, | ||
"id": { "$ref": "#/definitions/id" } | ||
}, | ||
"required" : [ "name", "method", "parameters" ], | ||
"additionalProperties": false | ||
}, | ||
|
||
"coordinate_system": { | ||
"type": "object", | ||
"properties": { | ||
"type": { "type": "string", "enum": ["CoordinateSystem"] }, | ||
"subtype": { "type": "string" }, | ||
"axis": { | ||
"type": "array", | ||
"items": { "$ref": "#/definitions/axis" } | ||
}, | ||
"id": { "$ref": "#/definitions/id" } | ||
}, | ||
"required" : [ "subtype", "axis" ], | ||
"additionalProperties": false | ||
}, | ||
|
||
"crs": { | ||
"oneOf": [ | ||
{ "$ref": "#/definitions/geodetic_crs" }, | ||
{ "$ref": "#/definitions/derived_crs" } | ||
] | ||
}, | ||
|
||
"datum": { | ||
"oneOf": [ { "$ref": "#/definitions/geodetic_reference_frame" } ] | ||
}, | ||
|
||
"derived_crs": { | ||
"type": "object", | ||
"allOf": [{ "$ref": "#/definitions/object_usage" }], | ||
"properties": { | ||
"type": { "type": "string", | ||
"enum": ["ProjectedCRS", "DerivedGeodeticCRS", | ||
"DerivedGeographicCRS"] }, | ||
"name": { "type": "string" }, | ||
"base_crs": { "$ref": "#/definitions/crs" }, | ||
"conversion": { "$ref": "#/definitions/conversion" }, | ||
"coordinate_system": { "$ref": "#/definitions/coordinate_system" }, | ||
"area": {}, | ||
"bbox": {}, | ||
"usages": {}, | ||
"remarks": {}, | ||
"id": {} | ||
}, | ||
"required" : [ "name", "base_crs", "conversion", "coordinate_system" ], | ||
"additionalProperties": false | ||
}, | ||
|
||
"ellipsoid": { | ||
"type": "object", | ||
"oneOf":[ | ||
{ | ||
"properties": { | ||
"type": { "type": "string", "enum": ["Ellipsoid"] }, | ||
"name": { "type": "string" }, | ||
"semi_major_axis": { "$ref": "#/definitions/value_and_unit" }, | ||
"semi_minor_axis": { "$ref": "#/definitions/value_and_unit" }, | ||
"id": { "$ref": "#/definitions/id" } | ||
}, | ||
"required" : [ "name", "semi_major_axis", "semi_minor_axis" ], | ||
"additionalProperties": false | ||
}, | ||
{ | ||
"properties": { | ||
"type": { "type": "string", "enum": ["Ellipsoid"] }, | ||
"name": { "type": "string" }, | ||
"semi_major_axis": { "$ref": "#/definitions/value_and_unit" }, | ||
"inverse_flattening": { "type": "number" }, | ||
"id": { "$ref": "#/definitions/id" } | ||
}, | ||
"required" : [ "name", "semi_major_axis", "inverse_flattening" ], | ||
"additionalProperties": false | ||
}, | ||
{ | ||
"properties": { | ||
"type": { "type": "string", "enum": ["Ellipsoid"] }, | ||
"name": { "type": "string" }, | ||
"radius": { "$ref": "#/definitions/value_and_unit" }, | ||
"id": { "$ref": "#/definitions/id" } | ||
}, | ||
"required" : [ "name", "radius" ], | ||
"additionalProperties": false | ||
} | ||
] | ||
}, | ||
|
||
"geodetic_crs": { | ||
"type": "object", | ||
"allOf": [{ "$ref": "#/definitions/object_usage" }], | ||
"properties": { | ||
"type": { "type": "string", "enum": ["GeodeticCRS", "GeographicCRS"] }, | ||
"name": { "type": "string" }, | ||
"datum": { "$ref": "#/definitions/datum" }, | ||
"coordinate_system": { "$ref": "#/definitions/coordinate_system" }, | ||
"area": {}, | ||
"bbox": {}, | ||
"usages": {}, | ||
"remarks": {}, | ||
"id": {} | ||
}, | ||
"required" : [ "name", "datum" ], | ||
"additionalProperties": false | ||
}, | ||
|
||
"geodetic_reference_frame": { | ||
"type": "object", | ||
"allOf": [{ "$ref": "#/definitions/object_usage" }], | ||
"properties": { | ||
"type": { "type": "string", "enum": ["GeodeticReferenceFrame"] }, | ||
"name": { "type": "string" }, | ||
"anchor": { "type": "string" }, | ||
"ellipsoid": { "$ref": "#/definitions/ellipsoid" }, | ||
"prime_meridian": { "$ref": "#/definitions/prime_meridian" }, | ||
"area": {}, | ||
"bbox": {}, | ||
"usages": {}, | ||
"remarks": {}, | ||
"id": {} | ||
}, | ||
"required" : [ "name", "ellipsoid" ], | ||
"additionalProperties": false | ||
}, | ||
|
||
"id": { | ||
"type": "object", | ||
"properties": { | ||
"authority": { "type": "string" }, | ||
"code": { | ||
"oneOf": [ { "type": "string" }, { "type": "integer" } ] | ||
} | ||
}, | ||
"required" : [ "authority", "code" ], | ||
"additionalProperties": false | ||
}, | ||
|
||
"method": { | ||
"type": "object", | ||
"properties": { | ||
"type": { "type": "string", "enum": ["OperationMethod"]}, | ||
"name": { "type": "string" }, | ||
"id": { "$ref": "#/definitions/id" } | ||
}, | ||
"required" : [ "name" ], | ||
"additionalProperties": false | ||
}, | ||
|
||
"object_usage": { | ||
"anyOf": [ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"area": { "type": "string" }, | ||
"bbox": { "$ref": "#/definitions/bbox" }, | ||
"remarks": { "type": "string" }, | ||
"id": { "$ref": "#/definitions/id" } | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"usages": { "$ref": "#/definitions/usages" }, | ||
"remarks": { "type": "string" }, | ||
"id": { "$ref": "#/definitions/id" } | ||
} | ||
} | ||
] | ||
}, | ||
|
||
"parameter_value": { | ||
"type": "object", | ||
"properties": { | ||
"type": { "type": "string", "enum": ["ParameterValue"] }, | ||
"name": { "type": "string" }, | ||
"value": { | ||
"oneOf": [ | ||
{ "type": "string" }, | ||
{ "type": "number" } | ||
] | ||
}, | ||
"unit": { "$ref": "#/definitions/unit" }, | ||
"id": { "$ref": "#/definitions/id" } | ||
}, | ||
"required" : [ "name", "value" ], | ||
"additionalProperties": false | ||
}, | ||
|
||
"prime_meridian": { | ||
"type": "object", | ||
"properties": { | ||
"type": { "type": "string", "enum": ["PrimeMeridian"] }, | ||
"name": { "type": "string" }, | ||
"longitude": { "$ref": "#/definitions/value_and_unit" }, | ||
"id": { "$ref": "#/definitions/id" } | ||
}, | ||
"required" : [ "name" ], | ||
"additionalProperties": false | ||
}, | ||
|
||
"unit": { | ||
"type": "object", | ||
"properties": { | ||
"type": { "type": "string", | ||
"enum": ["LinearUnit", "AngularUnit", "ScaleUnit", | ||
"TimeUnit", "ParametricUnit", "Unit"] }, | ||
"name": { "type": "string" }, | ||
"conversion_factor": { "type": "number" }, | ||
"id": { "$ref": "#/definitions/id" } | ||
}, | ||
"required" : [ "type", "name" ], | ||
"additionalProperties": false | ||
}, | ||
|
||
"usages": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"area": { "type": "string" }, | ||
"bbox": { "$ref": "#/definitions/bbox" } | ||
}, | ||
"additionalProperties": false | ||
} | ||
}, | ||
|
||
"value_and_unit": { | ||
"type": "object", | ||
"properties": { | ||
"value": { "type": "number" }, | ||
"unit": { "$ref": "#/definitions/unit" } | ||
}, | ||
"required" : [ "value", "unit" ], | ||
"additionalProperties": false | ||
} | ||
|
||
} | ||
} |