[OSM-talk] Cycle route improvements
Dave Stubbs
osm.list at randomjunk.co.uk
Tue Feb 5 18:43:02 GMT 2008
>
> > > but in lower zooms it gets messy since it's
> > > apparently a random one that "wins" for each section.
> >
> > That's a bug. It's actually deterministic, but I think what you're
> > seeing on some parts is things like the end of the wider line
> > overlapping with a different section. But I haven't sorted it yet.
>
> I see this:
> http://www.gravitystorm.co.uk/osm/?zoom=12&lat=6652000.91116&lon=496400.42424&layers=B00
>
> It looks random to me, but it could be "deterministic chaos" of
> course :-)
I think ncn always wins out, but rcn and lcn maybe painted in a
non-deterministic order (or at least, not in any defined order) if you
tagged it as a relation rather than directly on the ways. If this is
the case then it should be easy to fix by painting the rcn and lcn
routes in different mapnik layers, which they currently are not.
> > It's common for routes to be distinguished on signs by colour as much
> > as name or reference. I think they should be mapped with
> > signed_colour = yellow, since that makes it clear. Renderers can then
> > know that the colour is important, but still choose to ignore it if
> > they wish (or map the colours to a chosen palette, or keep all the
> > local routes in blue and put little coloured borders on them or
> > similar). Using "signed_colour" clarifies what we mean.
>
> I see, I was trying to avoid real colour names, but I guess we could
> further extend this colour tag to things like bus routes. I don't like
> signed_colour though, as that suggests that it's the colour of the
> signs, and I could well see someone adding "signed_colour=green" for
> all ncn, rcn and some lcn routes, since all those signs are green.
>
> I'd keep signed_colour only for when the colour really matters and
> should be displayed in that colour as well (like mountain bike routes
> over here, bus lines, subway lines etc). And another tag for the colour
> alternates which I was talking about.
With the colour alternatives -- it's not /that hard/ a problem to try
to figure this out automatically assuming exactly 1 relation to 1
route. Basically we just need to build a graph of which routes
intersect with which other routes, then run this through a graph
colouring algorithm. With the relatively small number of routes this
should be doable quickly, it's then just a matter of deciding which
routes you want coloured like this: one answer might be all lcn, or
all lcn with a name, or create a different type entirely.
More information about the talk
mailing list