[OSM-dev] Interpreting segments of a way

Etienne 80n80n at gmail.com
Mon Oct 23 16:13:40 BST 2006


On 10/23/06, bvh <bvh-osm at irule.be> wrote:
>
> On Mon, Oct 23, 2006 at 03:37:19PM +0100, Etienne wrote:
> > Ways are *ordered* lists of segments.
>
> On what basis should the ordering take place?


In a .osm file the <seg> elements within a <way> element are listed in the
order defined in the database.

In JOSM segments are sequenced in ways in the order in which they were
added.  So each time a segment is added it will be added to the end of the
list.  Once exception, if a node is inserted then the new segment is
inserted adjacent to the segment at the insertion point (which is what you
would expect).

There is no direct way of viewing or altering the segment order in JOSM.  I
think there is a way view and edit the segment order in the Applet.


> Currently there is no requirement for the segments to be contiguous or all
> > pointing in the same direction.
> >
> > At the moment many ways do have branches and loops in them.
> >
> > There are proposals to change the data model so that ways are ordered
> lists
> > of *nodes*.  This will prevent the creation of ways that contain
> branches
> > etc.  Existing ways containing branches will, no doubt, get converted
> into
> > several smaller non-branching ways.
>
> Which seems limiting. I know a few streets that are non-continious. How
> would those be represented in the new proposals?


Each non-contiguous part of the street would be a separate way.  There is a
subsiduary proposal to implement a hierarch of ways which would enable a
group of ways to be annotated with a common set of tag values (such as the
street's name).

 Etienne

cu bart
> >
> > On 10/23/06, bvh <bvh-osm at irule.be> wrote:
> > >
> > >Hi, there is some conflicting/incomplete(?) information on how to
> > >interpret the segment list of a way on the wiki.
> > >
> > >http://wiki.openstreetmap.org/index.php/Data_Primitives
> > >Just says segments for a way nothing more.
> > >
> > >http://wiki.openstreetmap.org/index.php/REST#Ways
> > >says that the list is "ordered".
> > >
> > >What is it and in the latter case : how should we interpret the
> > >ordering? Should ways consist of consecutive segments where each
> > >segment-endpoint is also the beginpoint of the next segment?
> > >Can three-pronged ways exist? If so, what about the order?
> > >
> > >Thanks for any clarification. If I get a good idea I will update the
> > >WIKI accordingly.
> > >
> > >cu bart
> > >
> > >_______________________________________________
> > >dev mailing list
> > >dev at openstreetmap.org
> > >http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
> > >
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20061023/52f6b730/attachment.html>


More information about the dev mailing list