Generic GeoJSON validation JSON Schema for GeoJSON
Copyright © 2015 Open Geospatial Consortium.
33
type: array, items: {
type: object, required: [ type, properties],
properties: { type: { enum: [ Feature ] },
geometry: { ref: definitionsgeometry }, properties: { type: object }
} }
} },
definitions: { geometry: {
title: geometry, type: object,
oneOf: [{ properties: {
type: { enum: [ Point] }, coordinates: {
type: array, minItems: 2,
items: { type: number} }
} },
{ properties: {
type: { enum: [ LineString, Multipoint]}, coordinates: {
type: array, minItems: 2,
items: { type: array,
minItems: 2, items : { type: number }
} }
} },
{ properties: {
type: { enum: [ Polygon, MultiLineString]},
coordinates: { type: array,
items: { type: array,
minItems: 2, items: {
type: array,
34
Copyright © 2015 Open Geospatial Consortium.
minItems: 2, items : { type: number }
} }
} }
}, {
properties: { type: { enum: [ MultiPolygon] },
coordinates: { type: array,
items: { type: array,
items: { type: array,
minItems: 2, items: {
type: array, minItems: 2,
items : { type: number } }
} }
} }
}, {
properties: { type: { enum: [ GeometryCollection]},
geometries: { type: array,
items: { ref: definitionsgeometry } }
} }]
} }
}