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

Jonas Svensson jonass at lysator.liu.se
Mon Jan 1 19:00:37 GMT 2007



On 1 Jan 2007 at 17:33, 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.
> 
> 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.
> 
> 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.
> 
> Any thoughts on this?
> Nick

About that last sentence. What if there is a way like:

-- seg1 -- seg2 -- seg 3 -- seg 4 --

and I got new gps-track to the left of it. How would I number those 
segments? Is there any other way than to have the tool, ie JOSM, to 
renumber all segments when adding segments?

/Jonas





More information about the talk mailing list