[OSM-talk] Advanced highway tagging

Karl Newman siliconfiend at gmail.com
Tue Nov 20 20:19:50 GMT 2007


Copying your reply back to list (I fight gmail on that, too).

On Nov 20, 2007 12:12 PM, Andrew MacKinnon <andrewpmk at gmail.com> wrote:
> > Fully agree. I'm actually planning on creating a nice little Java
> > library for taking a rules file very similar to Osmarender's which
> > will match rules against OSM elements based on their tags, and apply
> > an "action" if the rule matches. Initially I plan to contribute it to
> > Osmosis so it can be used for filtering on tags, but I hope to make it
> > generic enough so that I can use it for creating GPS maps (yes, I know
> > about the other projects), where one of the attributes of the "action"
> > would be a zoom level at which to show the element. Then you could do
> > something like highway=tertiary (with no other tags) will show at zoom
> > level 12 and higher, but highway=tertiary, abutters=residential won't
> > show up until zoom level 14. That should help make the renderers more
> > "intelligent".
>
> Hmm... It seems like most people on the list dislike any kind of
> subjective measures of a road's importance. I think that this is
> somewhat limiting, but it is probably not all bad. Suppose that for
> each road, we have the following properties:
>
> - Official designation
> - Controlled access?
> - Lanes
> - Dual carriageway?
> - Speed limit (or estimate thereof)
> - Approximate traffic level (low/medium/high)
>
> It would be possible to compute a road's colour on the map using some
> sort of weighting system. I dislike using properties like abutters
> though for this purpose because what surrounds a road only has a weak
> correlation with how fast a road is, e.g. both a fast road and a
> cul-de-sac can be surrounded by either residences, shops or just about
> anything else. I do not think that the road should be coloured on the
> map solely using the road's designation, because this is often of
> little significance.
>
> One possibility for the main map would be to set the hue of the road's
> colour based on the road's official designation, and set the
> brightness of the road's colour based on its importance. Thus, trunk
> roads will still be green, primary red and secondary orange, but more
> important roads would be shown in a darker colour, and less important
> roads would be shown in a lighter colour.
>
> It might be possible to determine at what zoom level a road should be
> shown by looking at (1) the density of roads around it and (2) how
> important each road is relative to roads which it intersects/which are
> located around it. The idea is that the road(s) with the highest
> importance in an area will be rendered at low zoom, and others will be
> omitted. However, I don't know how this algorithm would work, nor do I
> know how to make it produce a useable map.
>
> However, as I have said before, using solely objective measures to
> determine the colour of a road on the map is likely to make the map
> look rather ugly because roads are likely to change colour repeatedly
> on the map.
>




More information about the talk mailing list