[OSM-talk] non-linear ways
Etienne
80n80n at gmail.com
Tue May 16 16:14:33 BST 2006
A way may pass through a segment in a particular direction. Another
way may pass through the same segment but in the opposite direction.
So what is needed is a property on the seg element of a way that
indicates the direction of the way through that segment.
This could be defined either as the same as the direction in which the
segment was drawn or the opposite to the direction that the segment
was drawn. The database would need to support:
<way id='1'>
<seg id='123456' direction='1'/>
<seg id='712131' direction='1'/>
<seg id='100021' direction='-1'/>
</way>
This information _can_ be inferred using the same method as that of
the OP for correcting linear ways, but makes processing difficult and
would be better defined explicitly, I think.
Andy, your problem of the direction of the street name caption being
in conflict with the direction of the traffic using the way can be
addressed by adding a key to the way that tells the renderer in which
direction to write the caption. Perhaps textDirection=1 or -1.
Obviously the rendering software would then need to be changed to use
this information.
Etienne
On 5/16/06, Andy Robinson <Andy_J_Robinson at blueyonder.co.uk> wrote:
> Just to add another complexity on this issue, for map rendering purposes I
> will look to align the way or segments so that text placement via SVG
> creation looks right. That will on many occasions conflict with what is
> right for navigational use. Perhaps to be certain, we should generate the
> navigational requirements on a separate set of keys. I.e. parse through the
> data and add the direction to a new key and then edit those keys to be
> correct for navigation.
>
> Cheers,
>
> Andy
>
> Andy Robinson
> Andy_J_Robinson at blueyonder.co.uk
>
> >-----Original Message-----
> >From: talk-bounces at openstreetmap.org [mailto:talk-
> >bounces at openstreetmap.org] On Behalf Of Andrew Findlay
> >Sent: 16 May 2006 10:22
> >To: Simon Hewison
> >Cc: talk at openstreetmap.org
> >Subject: Re: [OSM-talk] non-linear ways
> >
> >On Mon, May 15, 2006 at 06:30:58PM +0100, Simon Hewison wrote:
> >
> >> It's non-linear because if you follow the direction of the segments as
> >> they are laid down, some of them are facing 'backwards'.
> >
> >There are bound to be many places where this is unavoidable. As segments
> >are allowed to be members of multiple ways, consider the case of a
> >bridge that is shared by two footpaths which happen to be drawn in
> >opposite directions:
> >
> >
> > Y
> > ^
> > |
> > |
> > |
> >A---------->P=========>Q---------->B
> > ^
> > |
> > |
> > |
> > X
> >
> >The way from A to B uses the P-Q segment 'correctly' but the X-Y way
> >uses it 'backwards'. Creating two segments between P and Q seems
> >silly when we are talking about a footpath bridge which may not be
> >wide enough for two people to pass in the middle, so we are stuck
> >with the 'backwards' segment.
> >
> >In some cases it may be possible to turn round all the segments on
> >one way so that both use the shared segment in the same direction,
> >but this will not always be possible.
> >
> >I think your algorithm will have to be more tolerant at nodes with
> >more than two segments.
> >
> >Andrew
> >--
> >-----------------------------------------------------------------------
> >| From Andrew Findlay, Skills 1st Ltd |
> >| Consultant in large-scale systems, networks, and directory services |
> >| http://www.skills-1st.co.uk/ +44 1628 782565 |
> >-----------------------------------------------------------------------
> >
> >_______________________________________________
> >talk mailing list
> >talk at openstreetmap.org
> >http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
>
>
>
>
> _______________________________________________
> talk mailing list
> talk at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
>
More information about the talk
mailing list