How can I represent Time in GeoJSON?

المشرف العام

Administrator
طاقم الإدارة
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?

أكثر...
 
أعلى