2010/7/3 John Smith <deltafoxtrot...@gmail.com>:
> On 3 July 2010 19:50, Konrad Skeri <kon...@skeri.com> wrote:
>> One possibility is to just use highway=link and then let the renderes
>> sort out the rest. A link is after all just a link no matter what it
>
> It may not be possible for preprocessing or renderers to figure it out.
>

1. Take the link that is to be rendered
2. Get the IDs of the endpoints.
3. For each endpoint get the IDs of all the ways that uses that point.
4. Render according to a table or a hierarchical rule

The endpoints are two, and the number of other ways using the
endpoints are not only finite but in practice limited. A rendering
table, which is the most complex and detailed way to do this would be
h^2 rules. (Where h is the number of recogniced highway-types. In
practice you won't have this many as you probably won't have links
between a service=driveway and a motorway) In any case I don't see the
overall complexity exceeding O(n) and the quasi code is only 4 lines
so the algorithm should be fairly straight forward and definitely
possible. Where the link is split into several ways the search has to
extend to the endpoint of the link connecting to the link.

Konrad

_______________________________________________
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk

Reply via email to