I'm modelling a bus route as a series of waypoints. Most of these waypoints have just a latitude and a longitude and represent points along a road. However, when the bus gets to a bus stop, the waypoint has an arrival and departure time associated with it. This information could potentially be relevant to plotting this route, for example, if I was to animate the progress of the bus.
Since I am going to be exposing these models through an API, I want to keep to standards by using the GeoJSON format. This will be my first time using GeoJSON. I know that the first three coordinates of a GeoJSON point are [longitude, latitude, elevation]. According to Tom Macwright, GeoJSON supports multi-dimensional coordinates. However, I couldn't find any information on any standards beyond those three.
I plan to represent the times in ticks (JavaScript ticks, i.e. number of milliseconds since midnight of January 1, 1970). I would like to use the following standard:
{
"type": "Point",
"coordinates": [longitude, latitude, null, arrivalTime, departureTime]
}
- Will this format collide with any GeoJSON standard?
- Elevation data is meaningless to me. Do I need the "null" in order to conform to GeoJSON?
A position is represented by an array of numbers. There must be at least two elements, and may be more. The order of elements must follow x, y, z order (easting, northing, altitude for coordinates in a projected coordinate reference system, or longitude, latitude, altitude for coordinates in a geographic coordinate reference system). Any number of additional elements are allowed -- interpretation and meaning of additional elements is beyond the scope of this specification.
Use null, extra elements should be after x, y, and ele.