[OSM-talk] non-linear ways
Andrew Findlay
andrew at findlay.org
Tue May 16 10:22:04 BST 2006
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 |
-----------------------------------------------------------------------
More information about the talk
mailing list