public-transport / friendly-public-transport-format

A format for APIs, libraries and datasets containing and working with public transport data.
Creative Commons Attribution Share Alike 4.0 International
119 stars 1 forks source link

add vehicle type #46

Open juliuste opened 5 years ago

juliuste commented 5 years ago

As far as I can tell, the only major type of public transformation information we are currently completely unable to express in FPTF is vehicles and their location. I therefore propose adding a vehicle type to FPTF@2 which could look as follows:

{
    type: 'vehicle', // required
    id: '123456', // required
    location: { // optional
        type: 'location',
        longitude: 52.5,
        latitude: 13.2
    },
    accessible: true, // barrier-free (e.g. for wheelchair users), optional
    model: '485' // model information, e.g. "Deutsche Bahn, Baureihe 485", optional
}

Note that this makes much more sense if we actually implement #43 in FPTF@2 because updating vehicle location could then be done by simply publishing more recent vehicle objects sharing the same id, indicating changed position information.

Opinions? 😄

juliuste commented 5 years ago

@derhuerst ping

juliuste commented 5 years ago

@derhuerst ping