[OSM-talk] The segments vs ways vs superways question, again...

Robert (Jamie) Munro rjmunro at arjam.net
Tue Jan 2 14:23:48 GMT 2007


Ed Davies wrote:
> Nick Whitelegg wrote:
> 
>> or programmatically re-ordering or splitting the way - a complex task I 
>> suspect), 
> 
> I don't see why this needs to be complex.  For unordered linear
> features all you have to do is match up nodes at the ends of segments.
> Where there are branches things are a little more complicated but
> I'd imagine that some simple heuristics would get you most of the
> way.  E.g., Split into connected sub-graphs, find the longest path
> through the each graph and take that as the "main" line then treat
> all connected graphs of what's left recursively in the same way.  Or
> maybe find the furthest apart connected nodes and take the shortest
> path between them as a main line.

I strongly agree with this.

>> but maybe best avoided in the first place by strongly recommending 
>> a certain structure in the data model.
> 
> I worry about "strong recommendations".  Something should be either
> right or wrong.  The best that "strong recommendation" could really
> mean is that out-of-order or branched ways are OK but will look
> horrible in some renderers.  This is just the sort of thing which
> will trap and disappoint new users.

Absolutely, and if something is wrong, the back end should tell you it's
wrong and not accept the change.

>> and logical 
>> order, and, for branched streets, have one way per branch. This may 
>> require a little more effort editing, 
> 
> More effort editing, especially if it comes without support or
> guidance from the editors seems like a really bad idea to me.

Things should require less effort editing because the editor makes the
decisions for you making sure things are correct, rather than you having
to make them.

>> e.g. when adding new segments to 
>> an existing way, make sure they are aligned in the same direction as the 
>> current way, and follow on in logical order. Maybe adding numerical segment 
>> indices (within the parent way) in JOSM would help here - then people 
>> would know which end to extend the way so that the segments follow on 
>> in logical order.
> 
>> Any thoughts on this?

Why do ways need an order? When is it useful? I can see that if we
implement rules that editors have to follow, then the order could be
useful in saving having to work out some things using graph based
herustics, but IMHO we should make the server do the herustics, or
provide a library for end users to do the herustics. Special cases where
the herustics fail could be handled with special tags on the ways or
segments concerned that the library would recognise.

In fact, why do we need ways? I think tags should be applied directly to
arbitrary groups of segments. So the tag "ref=M25" would have all the
segments that make up the M25 in it's group. The tag "highway=motorway"
would have all motorways etc. We'd need to be a bit careful to make sure
that roads with the same name in different towns are logically kept
separated, but that shouldn't be too hard to do. Of course this is a
major change to the data that can't be easily retrofitted, so I should
probably leave it to one side.

Robert (Jamie) Munro

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20070102/9b1d665d/attachment.pgp>


More information about the talk mailing list