Skip to content

Commit

Permalink
Add point accuracy & define optional point feature properties
Browse files Browse the repository at this point in the history
  • Loading branch information
ezheidtmann committed Sep 21, 2018
1 parent fd38f6e commit bace177
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,42 @@ Data: `{ "trips": [] }`, an array of objects with the following structure

### Routes

<<<<<<< HEAD
To represent a route, MDS `provider` APIs should create a GeoJSON Feature Collection, which includes every observed point in the route, and a timestamp.
||||||| merged common ancestors
To represent a route, MDS `provider` APIs should create a GeoJSON Feature Collection, which includes every observed point in the route, and a timestamp.
=======
To represent a route, MDS `provider` APIs should create a GeoJSON Feature Collection, which includes every observed point in the route. Each point is expressed as a GeoJSON `Feature` with a `Point` geometry.

Route point features must include at least a UTC timestamp and accuracy radius in the `properties` key. Optional fields may be omitted or use the `null` value.
>>>>>>> Add point accuracy & define optional point feature properties
Routes must include at least 2 points: the start point and end point. Additionally, routes must include all possible GPS samples collected by a provider.

#### Route point feature properties

| Field | Type | Required? | Example | Comments |
| -- | -- | -- | -- | -- |
| `timestamp` | Unix Timestamp | Required | `1529968782.421409` | Date when location was observed, expressed as seconds since midnight (0 hours) UTC on Jan 1, 1970. |
| `horizontalAccuracy` | Number | Required | `10` | Radius of uncertainty in meters. Must be positive. This field is not well-defined across platforms; but should be supplied in the spirit of [Android's `Location.getAccuracy`](https://developer.android.com/reference/android/location/Location#getAccuracy()) or [`CLLocation.horizontalAccuracy` from iOS](https://developer.apple.com/documentation/corelocation/cllocation/1423599-horizontalaccuracy). |
| `speed` | Number | Optional | `3.4` | Instantaneous speed in meters per second. Must be non-negative or `null`. Ref: [iOS](https://developer.apple.com/documentation/corelocation/cllocation/1423798-speed) [Android](https://developer.android.com/reference/android/location/Location#getSpeed()) |
| `course` | Number | Optional | `352` | The direction in which the device is traveling, measured in degrees and relative to due north. Must be in the range `[0, 360)` or `null`. Ref: [iOS](https://developer.apple.com/documentation/corelocation/cllocation/1423832-course) [Android](https://developer.android.com/reference/android/location/Location#getBearing()) |
| `altitude` | Number | Optional | `45` | The altitude, measured in meters. Ignored if `verticalAccuracy` is `null`. Ref: [iOS](https://developer.apple.com/documentation/corelocation/cllocation/1423820-altitude) [Android](https://developer.android.com/reference/android/location/Location#getAltitude()) |
| `verticalAccuracy` | Number | Optional | `30` | The uncertainty of the altitude value, in meters. Must be non-negative or `null`. Ref: [iOS](https://developer.apple.com/documentation/corelocation/cllocation/1423550-verticalaccuracy) [Android](https://developer.android.com/reference/android/location/Location.html#getVerticalAccuracyMeters()) |


#### Example route

```js
"route": {
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"properties": {
"timestamp": 1529968782.421409
"timestamp": 1529968782.421409,
"horizontalAccuracy": 15,
"speed": 5.4,
"course": null,
},
"geometry": {
"type": "Point",
Expand All @@ -143,7 +168,8 @@ Routes must include at least 2 points: the start point and end point. Additional
{
"type": "Feature",
"properties": {
"timestamp": 1531007628.3774529
"timestamp": 1531007628.3774529,
"horizontalAccuracy": 12
},
"geometry": {
"type": "Point",
Expand Down

0 comments on commit bace177

Please sign in to comment.