Hello, I would like to extract a list of all the relations representing bus routes in a given city (i would then access their information via RelationFullRecur(relID) API). Let's say I would like all the bus routes in London, how would i do that? I could look at http://wiki.openstreetmap.org/wiki/Bus_routes_in_London but I'm looking for like something more automatic and programmable Let's then extend it to include also tram routers, shuttles, and even boat routes (ie, all terrestrial public transportation services, nothing underground). Thanks! asked 24 Mar '16, 21:38 sandrotosi |
It appears you want to process data with the "osmapi" Python package. This package is a Python wrapper around OSM API functions. The RelationFullRecur(relID) method downloads a relation and all its members from the API using the A suitable way to get all relations of a particular kind in a particular area is using the Overpass API; see for example the last answer on How to get tram stops and lines (routes). Another option is simply downloading the full OSM data file for the region you're interested in and then pull the data from that; if you want to do that with Python, check out the Python bindings for the Osmium library. answered 24 Mar '16, 22:09 Frederik Ramm ♦ thanks for the references, I will look at them
(24 Mar '16, 22:27)
sandrotosi
|