Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions schemas/2020-12/ietf/geojson/bounding-box.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "RFC 7946 GeoJSON Bounding Box",
"description": "An array of numbers representing a bounding box that encloses a GeoJSON object, with coordinates in the order: westernmost, southernmost, easternmost, northernmost",
"examples": [
[ -180, -90, 180, 90 ],
[ -122.5, 37.5, -122.0, 38.0 ],
[ -180, -90, 0, 180, 90, 1000 ]
],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.rfc-editor.org/rfc/rfc7946#section-5" ],
"type": "array",
"anyOf": [
{
"description": "2D bounding box",
"maxItems": 4,
"minItems": 4,
"prefixItems": [
{
"description": "Westernmost longitude",
"$comment": "RFC 7946 does not constrain longitude range",
"type": "number"
},
{
"description": "Southernmost latitude",
"$ref": "../../iso/coordinate/2022/latitude.json"
},
{
"description": "Easternmost longitude",
"$comment": "RFC 7946 does not constrain longitude range",
"type": "number"
},
{
"description": "Northernmost latitude",
"$ref": "../../iso/coordinate/2022/latitude.json"
}
]
},
{
"description": "3D bounding box",
"maxItems": 6,
"minItems": 6,
"prefixItems": [
{
"description": "Westernmost longitude",
"$comment": "RFC 7946 does not constrain longitude range",
"type": "number"
},
{
"description": "Southernmost latitude",
"$ref": "../../iso/coordinate/2022/latitude.json"
},
{
"description": "Minimum altitude",
"$ref": "../../iso/coordinate/2022/altitude.json"
},
{
"description": "Easternmost longitude",
"$comment": "RFC 7946 does not constrain longitude range",
"type": "number"
},
{
"description": "Northernmost latitude",
"$ref": "../../iso/coordinate/2022/latitude.json"
},
{
"description": "Maximum altitude",
"$ref": "../../iso/coordinate/2022/altitude.json"
}
]
},
{
"description": "Higher dimension bounding box",
"minItems": 7,
"items": {
"type": "number"
}
}
]
}
53 changes: 53 additions & 0 deletions schemas/2020-12/ietf/geojson/feature-collection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "RFC 7946 GeoJSON FeatureCollection",
"description": "A collection of Feature objects",
"examples": [
{
"type": "FeatureCollection",
"features": []
},
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": null,
"properties": null
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [ 0, 0 ]
},
"properties": {
"name": "Example"
}
}
]
}
],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.rfc-editor.org/rfc/rfc7946#section-3.3" ],
"type": "object",
"required": [ "type", "features" ],
"properties": {
"type": {
"const": "FeatureCollection"
},
"features": {
"type": "array",
"items": {
"$ref": "feature.json"
}
},
"bbox": {
"$ref": "bounding-box.json"
},
"coordinates": false,
"geometries": false,
"geometry": false,
"properties": false
}
}
72 changes: 72 additions & 0 deletions schemas/2020-12/ietf/geojson/feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "RFC 7946 GeoJSON Feature",
"description": "A spatially bounded entity that combines a geometry with additional properties",
"examples": [
{
"type": "Feature",
"geometry": null,
"properties": null
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [ 0, 0 ]
},
"properties": {
"name": "Example"
}
},
{
"type": "Feature",
"id": "feature-1",
"geometry": {
"type": "Point",
"coordinates": [ 0, 0 ]
},
"properties": null
}
],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.rfc-editor.org/rfc/rfc7946#section-3.2" ],
"type": "object",
"required": [ "type", "geometry", "properties" ],
"properties": {
"type": {
"const": "Feature"
},
"id": {
"type": [ "number", "string" ]
},
"geometry": {
"anyOf": [
{
"const": null
},
{
"$ref": "geometry.json"
},
{
"$ref": "geometry-collection.json"
}
]
},
"properties": {
"anyOf": [
{
"const": null
},
{
"type": "object"
}
]
},
"bbox": {
"$ref": "bounding-box.json"
},
"coordinates": false,
"geometries": false,
"features": false
}
}
48 changes: 48 additions & 0 deletions schemas/2020-12/ietf/geojson/geometry-collection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "RFC 7946 GeoJSON GeometryCollection",
"description": "A geometry object that represents a collection of geometry objects",
"examples": [
{
"type": "GeometryCollection",
"geometries": []
},
{
"type": "GeometryCollection",
"geometries": [
{
"type": "Point",
"coordinates": [ 0, 0 ]
},
{
"type": "LineString",
"coordinates": [
[ 0, 0 ],
[ 1, 1 ]
]
}
]
}
],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.rfc-editor.org/rfc/rfc7946#section-3.1.8" ],
"type": "object",
"required": [ "type", "geometries" ],
"properties": {
"type": {
"const": "GeometryCollection"
},
"geometries": {
"type": "array",
"items": {
"$ref": "geometry.json"
}
},
"bbox": {
"$ref": "bounding-box.json"
},
"geometry": false,
"properties": false,
"features": false
}
}
51 changes: 51 additions & 0 deletions schemas/2020-12/ietf/geojson/geometry.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "RFC 7946 GeoJSON Geometry",
"description": "A geometry object representing coordinates in geographic space, excluding GeometryCollection",
"examples": [
{
"type": "Point",
"coordinates": [ 0, 0 ]
},
{
"type": "LineString",
"coordinates": [
[ 0, 0 ],
[ 1, 1 ]
]
},
{
"type": "Polygon",
"coordinates": [
[
[ 0, 0 ],
[ 1, 0 ],
[ 1, 1 ],
[ 0, 0 ]
]
]
}
],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.rfc-editor.org/rfc/rfc7946#section-3.1" ],
"anyOf": [
{
"$ref": "point.json"
},
{
"$ref": "line-string.json"
},
{
"$ref": "polygon.json"
},
{
"$ref": "multi-point.json"
},
{
"$ref": "multi-line-string.json"
},
{
"$ref": "multi-polygon.json"
}
]
}
28 changes: 28 additions & 0 deletions schemas/2020-12/ietf/geojson/line-string-coordinates.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "RFC 7946 GeoJSON LineString Coordinates",
"description": "An array of two or more positions representing the coordinates of a LineString geometry",
"examples": [
[
[ 0, 0 ],
[ 1, 1 ]
],
[
[ 0, 0 ],
[ 1, 1 ],
[ 2, 0 ]
],
[
[ 0, 0, 0 ],
[ 1, 1, 10 ],
[ 2, 0, 20 ]
]
],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.rfc-editor.org/rfc/rfc7946#section-3.1.4" ],
"type": "array",
"minItems": 2,
"items": {
"$ref": "point-coordinates.json"
}
}
40 changes: 40 additions & 0 deletions schemas/2020-12/ietf/geojson/line-string.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "RFC 7946 GeoJSON LineString",
"description": "A geometry object representing a connected sequence of two or more positions",
"examples": [
{
"type": "LineString",
"coordinates": [
[ 0, 0 ],
[ 1, 1 ]
]
},
{
"type": "LineString",
"coordinates": [
[ 0, 0 ],
[ 1, 1 ],
[ 2, 0 ]
]
}
],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.rfc-editor.org/rfc/rfc7946#section-3.1.4" ],
"type": "object",
"required": [ "type", "coordinates" ],
"properties": {
"type": {
"const": "LineString"
},
"coordinates": {
"$ref": "line-string-coordinates.json"
},
"bbox": {
"$ref": "bounding-box.json"
},
"geometry": false,
"properties": false,
"features": false
}
}
Loading