Last active
August 8, 2017 15:59
-
-
Save hc2p/fa9bbd632bcd0de818f99b8a8b3c4183 to your computer and use it in GitHub Desktop.
Schema for a Geo JSON feature object
This file contains hidden or 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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"id": "http://json-schema.org/geojson/geojson.json#", | |
"title": "Geo JSON Feature object", | |
"description": "Schema for a Geo JSON feature object", | |
"required": [ | |
"geometry", | |
"properties" | |
], | |
"properties": { | |
"type": { | |
"enum": [ | |
"Feature" | |
] | |
}, | |
"geometry": { | |
"$ref": "#/definitions/point.json#" | |
}, | |
"properties": { | |
"type": "object", | |
"oneOf": [ | |
{ "$ref": "http://json-schema.org/geojson/car_service" }, | |
{ "$ref": "http://json-schema.org/geojson/filling_station" }, | |
{ "$ref": "http://json-schema.org/geojson/parking_facility" } | |
] | |
}, | |
"id": { | |
"type": "string" | |
} | |
}, | |
"definitions": { | |
"point": { | |
"type": "object", | |
"required": [ | |
"type", | |
"coordinates" | |
], | |
"properties": { | |
"type": { | |
"enum": [ | |
"Point" | |
] | |
}, | |
"coordinates": { | |
"$ref": "#/definitions/position" | |
} | |
} | |
}, | |
"position": { | |
"description": "A single position", | |
"type": "array", | |
"minItems": 2, | |
"items": [ | |
{ | |
"type": "number" | |
}, | |
{ | |
"type": "number" | |
} | |
], | |
"additionalItems": false | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment