|
| 1 | +{ |
| 2 | + "$schema": "http://json-schema.org/draft-07/schema", |
| 3 | + "$id": "https://github.com/MobilityData/gbfs-json-schema/blob/master/v3.1-RC2/geofencing_zones.json", |
| 4 | + "description": "Describes geofencing zones and their associated rules and attributes (added in v2.1-RC).", |
| 5 | + "type": "object", |
| 6 | + "properties": { |
| 7 | + "last_updated": { |
| 8 | + "description": "Last time the data in the feed was updated in RFC3339 format.", |
| 9 | + "type": "string", |
| 10 | + "format": "date-time" |
| 11 | + }, |
| 12 | + "ttl": { |
| 13 | + "description": "Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed).", |
| 14 | + "type": "integer", |
| 15 | + "minimum": 0 |
| 16 | + }, |
| 17 | + "version": { |
| 18 | + "description": "GBFS version number to which the feed conforms, according to the versioning framework.", |
| 19 | + "type": "string", |
| 20 | + "const": "3.1-RC2" |
| 21 | + }, |
| 22 | + "data": { |
| 23 | + "description": "Array that contains geofencing information for the system.", |
| 24 | + "type": "object", |
| 25 | + "properties": { |
| 26 | + "geofencing_zones": { |
| 27 | + "type": "object", |
| 28 | + "description": "Each geofenced zone and its associated rules and attributes is described as an object within the array of features.", |
| 29 | + "properties": { |
| 30 | + "type": { |
| 31 | + "description": "FeatureCollection as per IETF RFC 7946.", |
| 32 | + "type": "string", |
| 33 | + "enum": ["FeatureCollection"] |
| 34 | + }, |
| 35 | + "features": { |
| 36 | + "description": "Array of objects.", |
| 37 | + "type": "array", |
| 38 | + "items": { |
| 39 | + "title": "GeoJSON Feature", |
| 40 | + "type": "object", |
| 41 | + "properties": { |
| 42 | + "type": { |
| 43 | + "type": "string", |
| 44 | + "enum": ["Feature"] |
| 45 | + }, |
| 46 | + "properties": { |
| 47 | + "description": "Describing travel allowances and limitations.", |
| 48 | + "type": "object", |
| 49 | + "properties": { |
| 50 | + "name": { |
| 51 | + "description": "Public name of the geofencing zone.", |
| 52 | + "type": "array", |
| 53 | + "items": { |
| 54 | + "type": "object", |
| 55 | + "properties": { |
| 56 | + "text": { |
| 57 | + "description": "The translated text.", |
| 58 | + "type": "string" |
| 59 | + }, |
| 60 | + "language": { |
| 61 | + "description": "IETF BCP 47 language code.", |
| 62 | + "type": "string", |
| 63 | + "pattern": "^[a-z]{2,3}(-[A-Z]{2})?$" |
| 64 | + } |
| 65 | + }, |
| 66 | + "required": ["text", "language"] |
| 67 | + } |
| 68 | + }, |
| 69 | + "start": { |
| 70 | + "description": "Start time of the geofencing zone in RFC3339 format.", |
| 71 | + "type": "string", |
| 72 | + "format": "date-time" |
| 73 | + }, |
| 74 | + "end": { |
| 75 | + "description": "End time of the geofencing zone in RFC3339 format.", |
| 76 | + "type": "string", |
| 77 | + "format": "date-time" |
| 78 | + }, |
| 79 | + "rules": { |
| 80 | + "description": "Array of Rule objects defining restrictions that apply within the area of the polygon.", |
| 81 | + "type": "array", |
| 82 | + "items": { |
| 83 | + "type": "object", |
| 84 | + "properties": { |
| 85 | + "vehicle_type_ids": { |
| 86 | + "type": "array", |
| 87 | + "description": "Array of vehicle type IDs for which these restrictions apply.", |
| 88 | + "items": { "type": "string" } |
| 89 | + }, |
| 90 | + "ride_start_allowed": { |
| 91 | + "description": "Is the ride allowed to start in this zone?", |
| 92 | + "type": "boolean" |
| 93 | + }, |
| 94 | + "ride_end_allowed": { |
| 95 | + "description": "Is the ride allowed to end in this zone?", |
| 96 | + "type": "boolean" |
| 97 | + }, |
| 98 | + "ride_through_allowed": { |
| 99 | + "description": "Is the ride allowed to travel through this zone?", |
| 100 | + "type": "boolean" |
| 101 | + }, |
| 102 | + "maximum_speed_kph": { |
| 103 | + "description": "What is the maximum speed allowed, in kilometers per hour?", |
| 104 | + "type": "integer", |
| 105 | + "minimum": 0 |
| 106 | + }, |
| 107 | + "station_parking": { |
| 108 | + "description": "Vehicle MUST be parked at stations defined in station_information.json within this geofence zone", |
| 109 | + "type": "boolean" |
| 110 | + } |
| 111 | + }, |
| 112 | + "required": [ |
| 113 | + "ride_start_allowed", |
| 114 | + "ride_end_allowed", |
| 115 | + "ride_through_allowed" |
| 116 | + ] |
| 117 | + } |
| 118 | + } |
| 119 | + } |
| 120 | + }, |
| 121 | + "geometry": { |
| 122 | + "description": "A polygon that describes where rides might not be able to start, end, go through, or have other limitations. Must follow the right-hand rule.", |
| 123 | + "title": "GeoJSON MultiPolygon", |
| 124 | + "type": "object", |
| 125 | + "properties": { |
| 126 | + "type": { |
| 127 | + "type": "string", |
| 128 | + "enum": ["MultiPolygon"] |
| 129 | + }, |
| 130 | + "coordinates": { |
| 131 | + "type": "array", |
| 132 | + "items": { |
| 133 | + "type": "array", |
| 134 | + "items": { |
| 135 | + "type": "array", |
| 136 | + "minItems": 4, |
| 137 | + "items": { |
| 138 | + "type": "array", |
| 139 | + "minItems": 2, |
| 140 | + "items": { |
| 141 | + "type": "number" |
| 142 | + } |
| 143 | + } |
| 144 | + } |
| 145 | + } |
| 146 | + } |
| 147 | + }, |
| 148 | + "required": ["type", "coordinates"] |
| 149 | + } |
| 150 | + }, |
| 151 | + "required": ["type", "geometry", "properties"] |
| 152 | + } |
| 153 | + } |
| 154 | + }, |
| 155 | + "required": ["type", "features"] |
| 156 | + }, |
| 157 | + "global_rules": { |
| 158 | + "description": "Array of Rule objects defining restrictions that apply globally in all areas as the default restrictions, except where overridden with an explicit geofencing zone.", |
| 159 | + "type": "array", |
| 160 | + "items": { |
| 161 | + "type": "object", |
| 162 | + "properties": { |
| 163 | + "vehicle_type_ids": { |
| 164 | + "type": "array", |
| 165 | + "description": "Array of vehicle type IDs for which these restrictions apply.", |
| 166 | + "items": { "type": "string" } |
| 167 | + }, |
| 168 | + "ride_start_allowed": { |
| 169 | + "description": "Is the ride allowed to start in this zone?", |
| 170 | + "type": "boolean" |
| 171 | + }, |
| 172 | + "ride_end_allowed": { |
| 173 | + "description": "Is the ride allowed to end in this zone?", |
| 174 | + "type": "boolean" |
| 175 | + }, |
| 176 | + "ride_through_allowed": { |
| 177 | + "description": "Is the ride allowed to travel through this zone?", |
| 178 | + "type": "boolean" |
| 179 | + }, |
| 180 | + "maximum_speed_kph": { |
| 181 | + "description": "What is the maximum speed allowed, in kilometers per hour?", |
| 182 | + "type": "integer", |
| 183 | + "minimum": 0 |
| 184 | + }, |
| 185 | + "station_parking": { |
| 186 | + "description": "Vehicle MUST be parked at stations defined in station_information.json within this geofence zone", |
| 187 | + "type": "boolean" |
| 188 | + } |
| 189 | + }, |
| 190 | + "required": [ |
| 191 | + "ride_start_allowed", |
| 192 | + "ride_end_allowed", |
| 193 | + "ride_through_allowed" |
| 194 | + ] |
| 195 | + } |
| 196 | + } |
| 197 | + }, |
| 198 | + "required": ["geofencing_zones", "global_rules"] |
| 199 | + } |
| 200 | + }, |
| 201 | + "required": ["last_updated", "ttl", "version", "data"] |
| 202 | +} |
0 commit comments