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

bvh bvh-osm at irule.be
Tue Jan 2 14:18:40 GMT 2007


On Mon, Jan 01, 2007 at 05:33:11PM +0000, Nick Whitelegg wrote:
> With the emergence of utilities to convert OSM data to .img and shapefile format, I think now would be a good time to raise this question again, as both .img and shapefile are polyline-orientated formats, with no notion of a segment. The presence of misordered ways and branched roads represented by a single way in the OSM database causes big problems here: problems that could be sorted by less than ideal work arounds (one polyline for one segment, or programmatically re-ordering or splitting the way - a complex task I suspect), but maybe best avoided in the first place by strongly recommending a certain structure in the data model.

What kind of problems specifically?

> There doesn't really seem to be much need for the concept of a segment in OSM, the node/way/superway data model (superways being used, for example, to cope with tree-like branched roads such as those found in housing estates - each branch being a way) being a model which could cope with every use case for the data that I can think of (even a node/way model could be used if people were happy representing branched roads as several ways with no entity for the whole road). However it would obviously be a major and probably impractical upheaval to do this, maybe doable in the future if there was a lot of spare time to work on it.

I take it that superways only contain ways? What about superways that contain
misordered ways? Aren't you just shuffling the problems around?

Imagine a superway consisting of three ways A,B and C (three different
ways because for example the middle part is pedestrian while the others 
are normal traffic and a user adds them like this (+ is node)

+-+A+-+ +-+-C-+-+ +-+-B-+-+

What problems do you currently have with misordered ways that would not
occur with such a misordered superway?

> A better solution in the interim perhaps would be to provide strong recommendations on the storage of ways - for example, make sure that ways comprise segments all aligned in the same direction and logical order, and, for branched streets, have one way per branch. This may require a little more effort editing, 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.

Merkaartor already has such numerical indeces :)

cu bart




More information about the talk mailing list