{ "$schema": "http://json-schema.org/draft-07/schema", "$id": "https://smart-data-models.github.io/dataModel.GBFS/geofencing_zones/schema.json", "description": "Describes geofencing zones and their associated rules and attributes (added in v2.1-RC). According to the Standard GBFS 2.2", "type": "object", "modelTags": "GBFS", "derivedFrom": "https://github.com/NABSA/gbfs/blob/v2.2/gbfs.md", "$schemaVersion": "0.0.1", "title": "Smart Data Models adaptation of GBFS standard data model geofencing_zones", "properties": { "id": { "$ref": "https://github.com/smart-data-models/data-models/raw/master/common-schema.json#/definitions/EntityIdentifierType" }, "type": { "type": "string", "description": "Property. NGSI entity type. It has to be geofencing_zones", "enum": [ "geofencing_zones" ] }, "last_updated": { "description": "Property. Last time the data in the feed was updated in POSIX time.", "type": "integer", "minimum": 1450155600 }, "ttl": { "description": "Property. Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed).", "type": "integer", "minimum": 0 }, "version": { "description": "Property. GBFS version number to which the feed conforms, according to the versioning framework.", "type": "string", "enum": [ "2.1-RC", "2.1-RC2", "2.1", "2.2", "3.0-RC", "3.0" ] }, "data": { "description": "Property. Array that contains geofencing information for the system.", "type": "object", "properties": { "geofencing_zones": { "type": "object", "description": "Each geofenced zone and its associated rules and attributes is described as an object within the array of features.", "properties": { "type": { "description": "FeatureCollection as per IETF RFC 7946.", "type": "string", "enum": [ "FeatureCollection" ] }, "features": { "description": "Array of objects.", "type": "array", "items": { "title": "GeoJSON Feature", "type": "object", "properties": { "type": { "type": "string", "enum": [ "Feature" ] }, "properties": { "description": "Describing travel allowances and limitations.", "type": "object", "properties": { "name": { "description": "Public name of the geofencing zone.", "type": "string" }, "start": { "description": "Start time of the geofencing zone in POSIX time.", "type": "number", "minimum": 1450155600 }, "end": { "description": "End time of the geofencing zone in POSIX time.", "type": "number", "minimum": 1450155600 }, "rules": { "description": "Array that contains one object per rule.", "type": "array", "items": { "type": "object", "properties": { "vehicle_type_id": { "type": "array", "description": "Array of vehicle type IDs for which these restrictions apply.", "items": { "type": "string" } }, "ride_allowed": { "description": "Is the undocked ride allowed to stat and end in this zone?", "type": "boolean" }, "ride_through_allowed": { "description": "Is the ride allowed to travel through this zone?", "type": "boolean" }, "maximum_speed_kph": { "description": "What is the maximum speed allowed, in kilometers per hour?", "type": "number", "minimum": 0 } }, "required": [ "ride_allowed", "ride_through_allowed" ] } } } }, "geometry": { "description": "A polygon that describes where rides might not be able to start, end, go through, or have otehr limitations. Must follow the right-hand rule.", "title": "GeoJSON MultiPolygon", "type": "object", "properties": { "type": { "type": "string", "enum": [ "MultiPolygon" ] }, "coordinates": { "type": "array", "items": { "type": "array", "items": { "type": "array", "minItems": 4, "items": { "type": "array", "minItems": 2, "items": { "type": "number" } } } } } }, "required": [ "type", "coordinates" ] } }, "required": [ "type", "geometry", "properties" ] } } }, "required": [ "type", "features" ] } } } }, "required": [ "id", "data", "last_updated", "ttl", "type", "version" ] }