[OSM-talk] The segments vs ways vs superways question again...
Scott
scott at waye.co.uk
Tue Jan 2 12:52:52 GMT 2007
On 1/1/2007, "Nick Whitelegg" <nick150971 at yahoo.co.uk> wrote:
>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?
The planet.osm and database has indices on the segments. As part of
route planning I was going to use these indicies to find the first and
last segments of a way. However I noticed pretty soon that some
segments are back to front or are numbered out of sequence. I wrote
some SQL to find and correct them, but then realised that I didn't
really need that data anyway. The order and direction (which is the
from node and which is the to node) is arguably mostly redundant. The
start and end nodes of a way can be found , with some SQL for example.
The only thing I lose is the direction of unidirectional ways, which
might be better stored on the way itself.
--
Scott
More information about the talk
mailing list