[OSM-talk] non-linear ways
Andy Robinson
Andy_J_Robinson at blueyonder.co.uk
Mon May 15 19:16:57 BST 2006
Simon,
There is a need to sort out segments that are wrong way around. In fact I
know that most motorway sections I drew up in the past have the direction
the same way for both carriageways as at the time this point had not been
considered, not by me at least.
On your last point regarding merging keys, I think you should leave all keys
present as they are. Any key is valid and a user may be relying on them.
What I would rather do is look through the keys and assign a Map Features
key and value using the information that is already there if possible. So
for example, if the segment has "class=footpath" you would automatically add
a "highway=footway" (not footpath) key if no highway key is already present.
If it already says "highway=bridleway" for example then it would be left as
it is as there are clearly different interpretations of what the object
actually is and both in reality may be valid or both may be wrong.
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 Simon Hewison
>Sent: 15 May 2006 18:31
>To: talk at openstreetmap.org
>Subject: [OSM-talk] non-linear ways
>
>I've started writing a sanity checking script that will locate ways with
> non-linear segments, yet look like a straight line.
>
>Working from the latest planet.osm extract, it's already found some.
>
>For instance, it's identified the Charlbury and Finstock footpath as
>being non-linear. (way id 240783)
>
>(bounding box containing it)
>-1.4954201009168266,51.857085117753876,-
>1.4734848258813946,51.86860919736889
>
>It's non-linear because if you follow the direction of the segments as
>they are laid down, some of them are facing 'backwards'.
>
>This isn't very important for footpaths (though it helps Osmarender to
>label correctly), but it's pretty much vital for motorways and one-way
>streets, when route planning software starts looking at "oneway" labels)
>
>These are rather obvious when you look at this in a recent JOSM with the
>arrowheads turned on.
>
>I'll soon work out how to get it to automatically prepare a correction
>for these (having first confirmed the data is up-to-date as per the
>api), to be applied via the API.
>
>The criteria is:
>
>The way should be an ordered list of segments
>All nodes of all segments are referenced only once in the list[1]
>The "to" attribute on a segment should match the "from" on the next
>segment on the way.
>
>This means that either: the way isn't ordered correctly
>or: one or more segments in the way need turning around.
>
>[1] probably need to deal with nodes that are referenced more than once
>in any way and deal appropriately, for instance, at complicated road
>junctions.
>
>Once I've done that, I may well want to see about getting a script to
>normalise the tags, so that for instance:
>
>class=footpath
>class=walking path
>highway=footpath
>
>all become
>highway=footway
>
>This might be a little contentious, since people already have code
>working on "old" keys and values, so I might get it to supplement the
>tags with the "new" ones.
>
>--
>Simon Hewison
>
>_______________________________________________
>talk mailing list
>talk at openstreetmap.org
>http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
More information about the talk
mailing list