├── README.md └── 1.0.0 └── README.md /README.md: -------------------------------------------------------------------------------- 1 | # TraceJSON 2 | 3 | TraceJSON is a [GeoJSON](https://geojson.org) extension for expressing GPS path data. It is designed for simplicity and compatibility with existing geo tools. 4 | 5 | ## Versions 6 | 7 | ### 1.0.0 8 | 9 | Initial release 10 | -------------------------------------------------------------------------------- /1.0.0/README.md: -------------------------------------------------------------------------------- 1 | # TraceJSON 2 | 3 | TraceJSON is a [GeoJSON](https://geojson.org) extension for expressing GPS path data. It is designed for simplicity and compatibility with existing geo tools. 4 | 5 | ## Format 6 | 7 | TraceJSON is a valid [GeoJSON Feature](https://tools.ietf.org/html/rfc7946#section-3.2) with a [LineString geometry](https://tools.ietf.org/html/rfc7946#section-3.1.4). An optional `timestamps` property is added containing an array of [UTC epoch millisecond timestamps](https://currentmillis.com). If a `timestamps` property is included with a feature, it must have the same number of elements as there are positions in the [`coordinates`](https://tools.ietf.org/html/rfc7946#section-3.1.1) array for the LineString geometry. 8 | 9 | ## Collections 10 | 11 | GPS data is often used in bulk. Collections of TraceJSON may be expressed as GeoJSON FeatureCollections or as [GeoJSONSeq](https://gdal.org/drivers/vector/geojsonseq.html) line delimited features. Line delimited features are highly encouraged for simplified parsing of streams of data. 12 | 13 | ## Example 14 | 15 | ```json 16 | { 17 | "type": "Feature", 18 | "properties": { 19 | "timestamps": [ 20 | 1564011260021, 21 | 1564011261801, 22 | 1564011262345, 23 | 1564011263968, 24 | 1564011264112, 25 | 1564011265883 26 | ] 27 | }, 28 | "geometry": { 29 | "type": "LineString", 30 | "coordinates": [ 31 | [ 32 | -122.4108213186264, 33 | 37.75107907205886 34 | ], 35 | [ 36 | -122.41099298000334, 37 | 37.751104521219816 38 | ], 39 | [ 40 | -122.41120755672455, 41 | 37.751053622889174 42 | ], 43 | [ 44 | -122.41160988807678, 45 | 37.751032415241085 46 | ], 47 | [ 48 | -122.41179764270781, 49 | 37.75092637690943 50 | ], 51 | [ 52 | -122.41169571876526, 53 | 37.75056160388812 54 | ] 55 | ] 56 | } 57 | } 58 | ``` 59 | 60 | ## Implementations 61 | 62 | - [sharedstreets-js](https://github.com/sharedstreets/sharedstreets-js) 63 | - [trip-simulator](https://github.com/sharedstreets/trip-simulator) 64 | - [trip-flows](https://github.com/sharedstreets/trip-flows) 65 | 66 | ## Related 67 | 68 | - [GPX, an XML based GPS format](https://www.topografix.com/gpx.asp) 69 | --------------------------------------------------------------------------------