You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: general-information.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,6 +108,8 @@ All String fields, such as `vehicle_id`, are limited to a maximum of 255 charact
108
108
109
109
## Stops
110
110
111
+
**Stops** describe vehicle trip end locations in a pre-designated physical place. They can vary from docking stations with or without charging, corrals with lock-to railings, or suggested parking areas marked with spray paint. **Stops** are used in both [Provider](/provider#stops) (including routes and event locations) and [Agency](/agency#stops) (including telemetry data).
112
+
111
113
| Field | Type | Required/Optional | Description |
| is_installed | Boolean | Required | See GBFS [station_status.json][gbfs-station-status]|
139
143
| is_renting | Boolean | Required | See GBFS [station_status.json][gbfs-station-status]|
140
144
| is_returning | Boolean | Required | See GBFS [station_status.json][gbfs-station-status]|
141
145
146
+
Example of the **Stop Status** object with properties listed:
147
+
148
+
```json
149
+
{
150
+
"is_installed": true,
151
+
"is_renting": false,
152
+
"is_returning": true
153
+
}
154
+
```
155
+
142
156
### GBFS Compatibility
143
157
144
158
Some of the fields in the `Stops` definition are using notions which are currently not in MDS, such as `rental_methods`. These fields are included for compatibility with GBFS.
@@ -264,7 +278,7 @@ If an unsupported or invalid version is requested, the API must respond with a s
Copy file name to clipboardExpand all lines: provider/README.md
+37-5Lines changed: 37 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,28 @@ represented as a GeoJSON [`Feature`][geojson-feature] object with a correspondin
120
120
}
121
121
```
122
122
123
+
#### Stop-based Geographic Data
124
+
125
+
When an individual location coordinate measurement corresponds to a [Stop][general-stops],
126
+
it must be presented with a `stop_id` property:
127
+
128
+
```json
129
+
{
130
+
"type": "Feature",
131
+
"properties": {
132
+
"timestamp": 1529968782421,
133
+
"stop_id": "b813cde2-a41c-4ae3-b409-72ff221e003d"
134
+
},
135
+
"geometry": {
136
+
"type": "Point",
137
+
"coordinates": [
138
+
-118.46710503101347,
139
+
33.9909333514159
140
+
]
141
+
}
142
+
}
143
+
```
144
+
123
145
#### Intersection Operation
124
146
125
147
For the purposes of this specification, the intersection of two geographic datatypes is defined according to the [`ST_Intersects` PostGIS operation][st-intersects]
@@ -207,13 +229,17 @@ To represent a route, MDS `provider` APIs must create a GeoJSON [`FeatureCollect
207
229
208
230
Routes must include at least 2 points: the start point and end point. Routes must include all possible GPS or GNSS samples collected by a Provider. Providers may round the latitude and longitude to the level of precision representing the maximum accuracy of the specific measurement. For example, [a-GPS][agps] is accurate to 5 decimal places, [differential GPS][dgps] is generally accurate to 6 decimal places. Providers may round those readings to the appropriate number for their systems.
209
231
232
+
Trips that start or end at a [Stop][general-stops] must include a `stop_id` property in the first (when starting) and last (when ending) Feature of the `route`. See [Stop-based Geographic Data][stop-based-geo] for more information.
233
+
210
234
```js
211
235
"route": {
212
236
"type":"FeatureCollection",
213
237
"features": [{
214
238
"type":"Feature",
215
239
"properties": {
216
-
"timestamp":1529968782421
240
+
"timestamp":1529968782421,
241
+
// Required for Trips starting at a Stop
242
+
"stop_id":"95084833-6a3f-4770-9919-de1ab4b8989b",
217
243
},
218
244
"geometry": {
219
245
"type":"Point",
@@ -226,7 +252,9 @@ Routes must include at least 2 points: the start point and end point. Routes mus
226
252
{
227
253
"type":"Feature",
228
254
"properties": {
229
-
"timestamp":1531007628377
255
+
"timestamp":1531007628377,
256
+
// Required for Trips ending at a Stop
257
+
"stop_id":"b813cde2-a41c-4ae3-b409-72ff221e003d"
230
258
},
231
259
"geometry": {
232
260
"type":"Point",
@@ -269,7 +297,7 @@ Unless stated otherwise by the municipality, this endpoint must return only thos
269
297
|`event_types`| Enum[]| Required |[Vehicle event(s)][vehicle-events] for state change, allowable values determined by `vehicle_state`|
270
298
|`event_time`|[timestamp][ts]| Required | Date/time that event occurred at. See [Event Times][event-times]|
271
299
|`publication_time`|[timestamp][ts]| Optional | Date/time that event became available through the status changes endpoint |
|`event_location`| GeoJSON [Point Feature][geo]| Required |See also [Stop-based Geographic Data][stop-based-geo]|
273
301
|`battery_pct`| Float | Required if Applicable | Percent battery charge of device, expressed between 0 and 1 |
274
302
|`trip_id`| UUID | Required if Applicable | Trip UUID (foreign key to Trips API), required if `event_types` contains `trip_start`, `trip_end`, `trip_cancel`, `trip_enter_jurisdiction`, or `trip_leave_jurisdiction`|
275
303
|`associated_ticket`| String | Optional | Identifier for an associated ticket inside an Agency-maintained 311 or CRM system |
@@ -319,6 +347,8 @@ Unless stated otherwise by the municipality, this endpoint must return only thos
319
347
320
348
> Note: As a result of this definition, consumers should query the [trips endpoint][trips] to infer when vehicles enter or leave the municipality boundary.
321
349
350
+
See also [Stop-based Geographic Data][stop-based-geo].
351
+
322
352
The schema and datatypes are the same as those defined for [`/status_changes`][status].
323
353
324
354
**Endpoint:**`/events`
@@ -400,8 +430,8 @@ In addition to the standard [Provider payload wrapper](#response-format), respon
400
430
|`last_event_time`|[timestamp][ts]| Required | Date/time when last state change occurred. See [Event Times][event-times]|
401
431
|`last_vehicle_state`| Enum | Required |[Vehicle state][vehicle-states] of most recent state change. |
402
432
|`last_event_types`| Enum[]| Required |[Vehicle event(s)][vehicle-events] of most recent state change, allowable values determined by `last_vehicle_state`. |
403
-
|`last_event_location`| GeoJSON [Point Feature][geo]| Required | Location of vehicle's last event |
404
-
|`current_location`| GeoJSON [Point Feature][geo]| Required if Applicable | Current location of vehicle if different from last event, and the vehicle is not currently on a trip |
433
+
|`last_event_location`| GeoJSON [Point Feature][geo]| Required | Location of vehicle's last event. See also [Stop-based Geographic Data][stop-based-geo].|
434
+
|`current_location`| GeoJSON [Point Feature][geo]| Required if Applicable | Current location of vehicle if different from last event, and the vehicle is not currently on a trip. See also [Stop-based Geographic Data][stop-based-geo].|
405
435
|`battery_pct`| Float | Required if Applicable | Percent battery charge of device, expressed between 0 and 1 |
406
436
407
437
[Top][toc]
@@ -417,6 +447,7 @@ In addition to the standard [Provider payload wrapper](#response-format), respon
0 commit comments