[OSM-talk] colour fills in osmarender
Raphael Jacquot
sxpert at esitcom.org
Fri Jun 9 02:18:33 BST 2006
Etienne wrote:
> Yes. In fact, I'm sure the current model is wrong.
>
> A way should be made up of an ordered list of nodes, not segments.
> This would remove all the problems with segment directionality and
> would speed up processing as well.
how about a way be composed of a linear set of segments, and
directionality is defined by the first and last node ?
if a way contains the following nodes and segments :
1 a 2 c 3 d 5 b 4
+-----+-----+-----+-----+
the segments can be ordered automatically, and the nodes too.
now, directionality is defined by "you can travel from 1 to 4" and "you
can travel from 4 to 1
there's an other solution though which may be better even (see below)
furthermore, it's very easy to also automatically create ways, as
there's a simple set of rules
a node with 0 segments does not currently belong to a way
a node with exactly 2 segments is within a way
all other nodes are the beginning or end of a way
for instance
+-----+-----+
|
+----+
can be described by 3 ways from the above set of rules.
furthermore. we could tack information about what is possible to do at a
particular interection. for instance
a b
+-----+-----+
| c
+
imagine c is a one way street getting into the intersection, but there's
a bike lane that allows going the other way in c.
the node at the intersection could have information like
cars:
from b you can go to a
from c you can go to a
from c you can go to b
bikes
from a you can go to b
from a you can go to c
from b you can go to a
from b you can go to c
from c you can go to a
from c you can go to b
this of course could be represented by some sort of variable size bitmap
(a 64 bit integer should be enough for each category, I don't imagine
an intersection with 8 streets ;D) and can be used easily by routing
algorithms.
what do you think ?
More information about the talk
mailing list