[Openstreetmap-dev] Data Primatives & schema
Immanuel Scholz
immanuel.scholz at gmx.de
Wed Dec 21 18:56:15 GMT 2005
Hi list,
> (segment number) => [ (first node number), second node number) )
>
> 0 => [0, 1)
> 321 => [1,101)
> 322 => [101,2)
> 2 => [2,3)
>
> is valid, but
>
> 0 => [0, 1)
> 321 => [1,101)
> 2 => [2,3)
>
> is not, because segments 321 and 2 are disjoint. also
Ways (former "street") can be any list of line segments. There may be some
ways that does not make any sense by this, but the server accept them anyway.
As example, a normal street is usually a continous way, but there are some
rare streets that have "gaps" between them. It is an explicit design feature
to allow ways with gaps or ways that that have the same segments more than
once (some bus routes in germany, Dresden drive a loop and then the same way
on the main street again) etc.
Ways are just a non-empty list of segments.
> perhaps this is another concept, then? maybe there is an intermediate
> level:
> - a segment is two distinct nodes
> - a line/polyline/whatever is a contiguous strip of segments with the
> rules stated before
> - a way is a set of line/polylines with a unique set of segments
The second data type is redundant and should be removed. A continous line can
be expressed by a general list of segments. Which brings us to our current
schema.
> it is useful to have a type for contiguous sections of roads, though,
> as they can be used to do route planning and things like that. you
> can measure their length, but you can't measure the length of
> discontinuous segments without making some assumption about how
> they're connected.
To me, there really is no need for a continous line. Any "continous way" (=any
way which happens to be continous) will do it. You can measure the length of
a continous way just like any other continous line thing.
And the algorithm to detect whether a way is continous is simple and fast.
> > Is "street" being used already? I thought not.
Streets are not implemented yet, except in JOSM, where it is called "track" ;)
> yeah, my mistake, we're using "track" apparently.
Uhm... NOW I am confused. I will wait for someone to update the Data Primitive
page on wiki and then use this names once and for all when talking to
you.. ;-)
Ciao, Imi.
More information about the dev
mailing list