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

matthew-osm at newtoncomputing.co.uk matthew-osm at newtoncomputing.co.uk
Tue Jan 2 22:45:58 GMT 2007


Happy new year, one and all!

On Mon, Jan 01, 2007 at 05:33:11PM +0000, Nick Whitelegg wrote:
...
> 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
...
> 
> Any thoughts on this?

[ Summary: I vote "Node, Segment, Way" becomes "Node, Path, Group" ;-) ]

I posted my thoughts on this to dev a few weeks ago:

http://lists.openstreetmap.org/pipermail/dev/2006-November/002539.html

I like the idea of using paths rather than segments, and propose the following
to make the transition easier:

  nodes stay as nodes

  segments are extended to become paths (i.e. ordered list of >1 nodes) - db
  backend needs updating, but tools will still work as before until they are
  updated, as a segment is just a path of two nodes

  ways are renamed to groups

after this transition was made in the db, an automated client could maybe scan
the data for ways, and alter them to be a group of paths if they contained a
branch, or just a path if they did not contain branches. I would also suggest
that tags were again then put directly on the paths, rather than on the new
groups, unless necessary.

This transition avoids the problems of "how do we convert a way to a new path,
and where do we create 'superways'".

A group of paths makes much more sense than a way. For example, bus routes
(add all paths that are in the route to the group), and, i.e., county borders
(each path that is a border would belong to two groups - one for each
neighbouring county).

-- 
Matthew




More information about the talk mailing list