-
-
Save dmfenton/bf8041b9498f8ec7a737 to your computer and use it in GitHub Desktop.
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 object", | |
| "description": "Schema for a Geo JSON object", | |
| "type": "object", | |
| "required": [ "type" ], | |
| "oneOf": [ | |
| { "$ref": "http://json-schema.org/geojson/geometry.json#" }, | |
| { "$ref": "#/definitions/geometryCollection" }, | |
| { "$ref": "#/definitions/feature" }, | |
| { "$ref": "#/definitions/featureCollection" } | |
| ], | |
| "definitions": { | |
| "geometryCollection": { | |
| "title": "GeometryCollection", | |
| "description": "A collection of geometry objects", | |
| "required": [ "geometries" ], | |
| "properties": { | |
| "type": { "enum": [ "GeometryCollection" ] }, | |
| "geometries": { | |
| "type": "array", | |
| "items": { "$ref": "http://json-schema.org/geojson/geometry.json#" } | |
| } | |
| } | |
| }, | |
| "feature": { | |
| "title": "Feature", | |
| "description": "A Geo JSON feature object", | |
| "required": [ "geometry", "properties" ], | |
| "properties": { | |
| "type": { "enum": [ "Feature" ] }, | |
| "geometry": { | |
| "oneOf": [ | |
| { "type": "null" }, | |
| { "$ref": "http://json-schema.org/geojson/geometry.json#" } | |
| ] | |
| }, | |
| "properties": { "type": [ "object", "null" ] }, | |
| "id": { "FIXME": "may be there, type not known (string? number?)" } | |
| } | |
| }, | |
| "featureCollection": { | |
| "title": "FeatureCollection", | |
| "description": "A Geo JSON feature collection", | |
| "required": [ "features" ], | |
| "properties": { | |
| "type": { "enum": [ "FeatureCollection" ] }, | |
| "features": { | |
| "type": "array", | |
| "items": { "$ref": "#/definitions/feature" } | |
| } | |
| } | |
| } | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment