Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Schema for a Geo JSON feature object
{
"$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
You can’t perform that action at this time.