Skip to content

Commit 0dd8e21

Browse files
authored
Adding geographic data
1 parent b0e0df2 commit 0dd8e21

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

general-information.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,61 @@ Additionally, `device_id` must remain constant for the device's lifetime of serv
5959

6060
[Top][toc]
6161

62+
## Geographic Data
63+
64+
References to geographic datatypes (Point, MultiPolygon, etc.) imply coordinates encoded in the [WGS 84 (EPSG:4326)][wgs84] standard GPS or GNSS projection expressed as [Decimal Degrees][decimal-degrees].
65+
66+
Whenever an individual location coordinate measurement is presented, it must be
67+
represented as a GeoJSON [`Feature`][geojson-feature] object with a corresponding [`timestamp`][ts] property and [`Point`][geojson-point] geometry:
68+
69+
```json
70+
{
71+
"type": "Feature",
72+
"properties": {
73+
"timestamp": 1529968782421
74+
},
75+
"geometry": {
76+
"type": "Point",
77+
"coordinates": [
78+
-118.46710503101347,
79+
33.9909333514159
80+
]
81+
}
82+
}
83+
```
84+
85+
### Stop-based Geographic Data
86+
87+
When an individual location coordinate measurement corresponds to a [Stop][general-stops],
88+
it must be presented with a `stop_id` property:
89+
90+
```json
91+
{
92+
"type": "Feature",
93+
"properties": {
94+
"timestamp": 1529968782421,
95+
"stop_id": "b813cde2-a41c-4ae3-b409-72ff221e003d"
96+
},
97+
"geometry": {
98+
"type": "Point",
99+
"coordinates": [
100+
-118.46710503101347,
101+
33.9909333514159
102+
]
103+
}
104+
}
105+
```
106+
107+
### Intersection Operation
108+
109+
For the purposes of this specification, the intersection of two geographic datatypes is defined according to the [`ST_Intersects` PostGIS operation][st-intersects]
110+
111+
> If a geometry or geography shares any portion of space then they intersect. For geography -- tolerance is 0.00001 meters (so any points that are close are considered to intersect).
112+
>
113+
> Overlaps, Touches, Within all imply spatial intersection. If any of the aforementioned returns true, then the geometries also spatially intersect. Disjoint implies false for spatial intersection.
114+
115+
[Top][toc]
116+
62117
## Propulsion Types
63118

64119
| `propulsion` | Description |

0 commit comments

Comments
 (0)