[Openstreetmap-dev] Streets in GPX
immanuel.scholz at gmx.de
immanuel.scholz at gmx.de
Fri Sep 23 15:34:28 BST 2005
Hi,
>> Before I dive in, my take on streets:
>>
>> Street segments connect two nodes, and have an implicit direction in
>> which node is first and which is last.
>>
>> By making streets a list of segments you can do cool things like have
>> non-connected streets. I'm desperately trying to think of an example
>> where this is useful, but I'm sure that there must be one.
>>
>> The other thing is that segments can belong to multiple streets. So
>> multiple segments can belong to 'baker street' but they can also belong
>> to 'Bus number 13's route'.
>
> I see what you mean about this. However, could this also be done by
> representing bus routes (or routes calculated by route-planners) as a list
> of
> streets and nodes? e.g.
>
> Bus 219 route
> StreetID Startnode Endnode
> 286 50 63
> 287 1 3
> 90281 12 1
> 2131 54 42
> etc?
Now you are starting to introduce structure. A new data type: bus route.
May be you are able to share that datatype and label it "route". Still the
resulting structure is more complex than the simple "tracks=routes=streets
are vectors of street segments".
If a part of a track segment has to be shared among different tracks, you
could split up the segment into 3 pieces: The piece before the common
track, the common track and the piece after the common track:
Example: (enable fixed sized font)
bus 13
--------\
\ Baker street
-----A----+------B-------+-----C--------
Baker street \
\ bus 13
\
If the track segment was former composed of a single track segment ABC, it
is now split into A, which only belongs to "Baker Street", B which is
assigned to both, the street and the bus route and C, which is only in
"Baker Street" too.
Note anyway, that I would prefer Steve's idea of a segment only connecting
two nodes and composing of a street as a list of 2-node-segments. This
implies to me, that we don't use GPX as primary transfer mechanism or at
least, that the GPX-export from the server will be a strange GPX with
every track segment consisting of only 2 nodes (and the list of these
segments are unordered).
> If the streets were edited, the node numbers would have to be updated, but
> that would presumably also be the case if segments were edited too?
>
> I tend to agree with Imi that streets are best represented as n-node
> segments;
Sorry, that I have to backstab you, but I don't think streets should be
composed of n-node segments. I say, that GPX does it this way and if we do
GPX, we HAVE to do it too. ;-)
And I said, that both data representations are interexchangable, however
it could be more time consuming to convert from 2-node-segments to
n-node-segments.
Ciao, Imi.
More information about the dev
mailing list