[Talk-transit] Bus/Tram/Metro paths export

ant antofosm at gmail.com
Thu Jan 27 17:40:00 GMT 2011


Hi,

On 27.01.2011 11:31, Tiziano D'Angelo wrote:
> Hello,
>
> after doing so much work onto bus/tram relations in my city Padova, I'd like
> now to extract some geographically exact paths of single routes from OSM
> database, possibly in SVG format, and use them on a Padova-PT website I am
> going to build soon.
> Most of you are probably familiar with
> http://78.46.81.38/public_transport.html , and I can already obtain sketches
> of the routes, but my aim is to obtain something with this output:
> http://upload.wikimedia.org/wikipedia/commons/9/9b/Ligne_4.gif for just a
> single line like in the example, or also with more lines (selecting for
> example all evening lines, or all Sunday lines). In this case, for a simpler
> rendering of everything, the stops aside the way should be coupled together
> if they have the same name (as in OPNVKarte) and the corresponding dot
> should be part of the drawn route.
> I do not have extendend programming skills, therefore I don't know how to
> obtain it, can somebody help?

If you want to work with OpenLayers, you can simply create GPX files 
from the routes you want to draw (there are GPX export functions in JOSM 
and Merkaartor). Then you'll need a list of stops and their positions. 
To couple stops together, you could search stops that share the same 
name and find the intersection of the line connecting the two poles with 
the track you are drawing. Finally you need to draw the labels. 
OpenLayers should support that, but I haven't used this feature yet. 
Hope this helps.

cheers
ant



More information about the Talk-transit mailing list