[Loadstone] Train stations from OpenStreetMap
Lulu-Ann
Lulu-Ann at gmx.de
Sun Mar 28 15:41:29 BST 2010
Sean Randall <seanr at randylaptop.com> wrote:
> Subject: [Loadstone] Greetings and train stations
> I'm sure you all know of wayfinder's eventual demise by now, I must remember
> that I'm a newcomer here after all. My question to myself, really, was how
> to replicate this station thing with Loadstone, before my next trip (which
> is on Saturday).
[..]
> I had a brief look at Open Street map, but without spending more time, I
> couldn't figure a way to find and add more than one station at once. They
> aren't like bus stops, where you can work on a local radius, because the
> whole idea is you're going from one place to another, those 2 being
> potentially quite a distance apart.
Hi there,
there is an quite easy way to query objects of a certain type from
OpenStreetMap.
The complete description can be found on
http://wiki.openstreetmap.org/wiki/XAPI
You query the OSM API for train stations using:
http://www.informationfreeway.org/api/0.6/*[railway=station]
and for smaller stations with
http://www.informationfreeway.org/api/0.6/*[railway=halt]
You can limit the output to an area using a bounding box, that means
limiting coordinats:
http://www.informationfreeway.org/api/0.6/*[railway=station]?bbox=11.111,48.000,12.222,48.444
where 11.111 is the limit to the west,
48.000 is the limit to the south
12.222 is the limit to the east,
and 48.444 is the limit to the north.
Then you get an .osm file with the stations with needs to go through a
converter (Does the converter only accept crossings and amenity POIs?).
The converter needs to add the railway to a loadstone database file.
Does it work already this way?
Regards
Lulu-Ann
More information about the Loadstone
mailing list