[Talk-transit] OSM / OPNV-Karte to Excel/SVG

Christoph Boehme christoph at b3e.net
Wed Jan 20 15:18:11 GMT 2010

Hi Tiziano,

I am not aware of any tools which can do what you want out of the box. 
but here are some ideas which might be helpful for you:

I use Xapi [1] a lot to retrieve only a specific portion of the OSM data 
for a large area (e.g. all relations with a route=bus tag).

Once I have osm file with all the data I need, I find it quite 
convenient to use xslt to convert the xml data into other formats. I 
have some scripts that might be helpful to get the grip of xslt. If you 
are interested I can sent them to you. I use these scripts for example 
to convert nodes or ways from osm into sql insert statements, but you 
can easily create a csv files as well.

Topological maps can be created with mapnik which supports outputting 
svg files. If you use version 0.6.0 or newer you can directly use an osm 
file as data source.

I do not know of any tool to create a straight line graph of a way. I 
thought a while ago about writing a tool to draw such graphs but never 
got round to actually do it. My idea was to reproject the input data way 
segment by way segment so that it was on a straight line and then feed 
this into mapnik.

You could, of course, also write an xslt script which converts the osm 
data directly to mapnik.


[1] http://wiki.openstreetmap.org/wiki/Xapi

On 19/01/2010 23:16, Tiziano D'Angelo wrote:
> Hello to everyone!
> I am currently building the Padova bus&  tram network. Almost all the routes
> are there, and most of the stops in the city center. I'm doing then line by
> line surveys about the missing stops. The current result is visible here:
> http://www.öpnvkarte.de/?zoom=12&lat=45.40287&lon=11.8559&layers=BT<http://www.xn--pnvkarte-m4a.de/?zoom=12&lat=45.40287&lon=11.8559&layers=BT>and
> http://www.openstreetmap.org/browse/relation/382350 as a network relation.
> I'm currently ordering the stops so they show up in OPNVKarte in the proper
> order.
> As another bonus to the work done, I'd love to export the data of each route
> relation first to some excel/text/CSV file or database where I can see
> lat/long + name of the stop in the correct forward/backward order for each
> line (so I can send the updated data to the author of Metro (
> http://nanika.net/Metro), and
> then, I'd like to export the data to SVG files to do graphs for each route
> of the network (both as topological maps
> http://en.wikipedia.org/wiki/File:Bakerloo_line_Topological_map.svg and as
> this graph: http://en.wikipedia.org/wiki/File:Bakerloo_Line.svg) and also of
> the entire network, just leaving on it the lines and names of the stops, and
> as a further development, create a map similar to the Paris/London metro
> network. Could anybody explain me how to do any of these things?
> Thanks
> Tiziano
> _______________________________________________
> Talk-transit mailing list
> Talk-transit at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/talk-transit

More information about the Talk-transit mailing list