|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "title": "RFC 7946 GeoJSON Bounding Box", |
| 4 | + "description": "An array of numbers representing a bounding box that encloses a GeoJSON object, with coordinates in the order: westernmost, southernmost, easternmost, northernmost", |
| 5 | + "examples": [ |
| 6 | + [ -180, -90, 180, 90 ], |
| 7 | + [ -122.5, 37.5, -122.0, 38.0 ], |
| 8 | + [ -180, -90, 0, 180, 90, 1000 ] |
| 9 | + ], |
| 10 | + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", |
| 11 | + "x-links": [ "https://www.rfc-editor.org/rfc/rfc7946#section-5" ], |
| 12 | + "type": "array", |
| 13 | + "anyOf": [ |
| 14 | + { |
| 15 | + "description": "2D bounding box", |
| 16 | + "maxItems": 4, |
| 17 | + "minItems": 4, |
| 18 | + "prefixItems": [ |
| 19 | + { |
| 20 | + "description": "Westernmost longitude", |
| 21 | + "$comment": "RFC 7946 does not constrain longitude range", |
| 22 | + "type": "number" |
| 23 | + }, |
| 24 | + { |
| 25 | + "description": "Southernmost latitude", |
| 26 | + "$ref": "../../iso/coordinate/2022/latitude.json" |
| 27 | + }, |
| 28 | + { |
| 29 | + "description": "Easternmost longitude", |
| 30 | + "$comment": "RFC 7946 does not constrain longitude range", |
| 31 | + "type": "number" |
| 32 | + }, |
| 33 | + { |
| 34 | + "description": "Northernmost latitude", |
| 35 | + "$ref": "../../iso/coordinate/2022/latitude.json" |
| 36 | + } |
| 37 | + ] |
| 38 | + }, |
| 39 | + { |
| 40 | + "description": "3D bounding box", |
| 41 | + "maxItems": 6, |
| 42 | + "minItems": 6, |
| 43 | + "prefixItems": [ |
| 44 | + { |
| 45 | + "description": "Westernmost longitude", |
| 46 | + "$comment": "RFC 7946 does not constrain longitude range", |
| 47 | + "type": "number" |
| 48 | + }, |
| 49 | + { |
| 50 | + "description": "Southernmost latitude", |
| 51 | + "$ref": "../../iso/coordinate/2022/latitude.json" |
| 52 | + }, |
| 53 | + { |
| 54 | + "description": "Minimum altitude", |
| 55 | + "$ref": "../../iso/coordinate/2022/altitude.json" |
| 56 | + }, |
| 57 | + { |
| 58 | + "description": "Easternmost longitude", |
| 59 | + "$comment": "RFC 7946 does not constrain longitude range", |
| 60 | + "type": "number" |
| 61 | + }, |
| 62 | + { |
| 63 | + "description": "Northernmost latitude", |
| 64 | + "$ref": "../../iso/coordinate/2022/latitude.json" |
| 65 | + }, |
| 66 | + { |
| 67 | + "description": "Maximum altitude", |
| 68 | + "$ref": "../../iso/coordinate/2022/altitude.json" |
| 69 | + } |
| 70 | + ] |
| 71 | + }, |
| 72 | + { |
| 73 | + "description": "Higher dimension bounding box", |
| 74 | + "minItems": 7, |
| 75 | + "items": { |
| 76 | + "type": "number" |
| 77 | + } |
| 78 | + } |
| 79 | + ] |
| 80 | +} |
0 commit comments