[OSM-talk] colour fills in osmarender
Etienne
80n80n at gmail.com
Fri Jun 9 08:29:07 BST 2006
Hmmm... currently ways can contain branches and loops. A simple
ordered list of nodes would not be able to handle a roundabout like
this:
<way>
<seg id='a'/>
<seg id='b'/>
<seg id='c'/>
<seg id='d'/>
<seg id='e'/>
<seg id='f'/>
</way>
1 -a- 2 -b- 3
| |
c d
| |
4 -e- 5 -f- 6
Using nodes you would need to have:
<way>
<node id='1'/>
<node id='2'/>
</way>
<way>
<node id='6'/>
<node id='5'/>
</way>
<way one-way='true'>
<node id='2'/>
<node id='3'/>
<node id='5'/>
<node id='4'/>
<node id='2'/>
</way>
ie a separate way for each part of the path.
With the current segment based definition of a way it is not clear to
me what the semantics are (or should be) for ways that contain
branches and loops. With a node based definition it would be more
precise but every loop and branch would need to be a separate way (the
upside is that we wouldn't need segments at all!!!).
Are loops and branches in ways a good thing or a bad thing? I can
imagine that route planning applications might find them problematic,
Etienne
On 6/9/06, Raphael Jacquot <sxpert at esitcom.org> wrote:
> 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