[iRail] unique id-name-latlon

flo orangeman at teleportr.org
Fri Aug 13 11:51:34 UTC 2010


Hi,

really interesting discussions going on here!

Personally I really like the simplicity of the iRail API in design!
It would be really great to have this as a worldwide available
standard that makes transit software interoperable.
Until we get to this point (ideal future) there is always that human
interface HTML which is also kind of an API ;-)
As you said it seems the "right way to go" to use that interface and
stick with names (string) for stations for now.
That is how humans generally interact with such "HTML-APIs" and what
we kind of emulate with our "machines".
Certainly most transit systems use some kind of (internal) unique
"ids" for all things identifyable like stations and stops. In some
countries these identifiers are even written on the visible signs for
example at bus stops. In this case they are often mapped in
openstreetmap with the "ref" tag. In other countries like UK there
have been large official dataset imports to openstreetmap (eg NAPTAN)
so that many official ids are already available there. Generally the
OSM-id of a station/stops seems a good candidate for a global unique
independent identifier. Most of the "names" (string) are already
available there under a share-friendly (cc-by-sa) license. Additional
area/agency/system-specific ids would be great to collect/have in the
long term but maybe we should start with names and make exact
identifiers optional where available (datasetwise and apiwise) e.g.:
...trains.php?from=STATIONNAME&to=STATIONNAME
...trains.php?from_id=STATION-ID&to_id=STATION-ID
just my2cents

Another issue that I wonder what you think about is the
id-name-latlon-uniqueness. In many situations there is for example a
bus_stop at a junction that has four physical latlon places on
different sides of the road where people actually wait and the busses
actually do stop. But all these places share the same stop-name. At
bigger (eg central) stations there are many different  things mapped
like train-tracks/-platforms, subway-entrances, bus-stops, etc all
with the same name of that bigger station. For autocompletion in a
textfield it doesn't make sense to have the same name several times.
also the string-parameter for HTML-APIs can be unique. But for mapping
to hafas-ids or osm-ids or for nearby-search or for displaying stops
on a map it makes sense to separate them as soon as the distances
become larger than eg just the opposite of the street..?

Regarding the wiki
http://github.com/Tuinslak/iRail/blob/master/api/trains.php is it ok
to add teleportr.org repos even if the iRail api is not implemented
yet? it certainly will be soon ;-)

best wishes and happy scraping!
flo



More information about the iRail mailing list