[OSM-talk] Data primitives (was: The segments vs ways vs superways question again...)

Jochen Topf jochen at remote.org
Wed Jan 3 15:54:19 GMT 2007


On Wed, Jan 03, 2007 at 03:17:05PM +0000, guy at graviles-reynolds.org wrote:
> Quoting Jochen Topf <jochen at remote.org>:
> > 
> > You thought this was complicated? It gets worse...
> > 
> > Lets consider a primary road that goes through a larger town, you'll
> > probably
> > have sections with different speed limits and other characteristics. Some
> > parts
> > may be single-lane, some multi-lane, some divided, some not. But it is
> > still
> > only one road with one name. Or even worse: A motorway, crossing a whole
> > country. Currently we draw both parts of a devided motorway as different
> > paths,
> > but thats not right. You'll never be able to render motorways properly on
> > all
> > scales doing that. They follow, after all, the same polyline. Sure one part
> > is
> > a few meters to the left and one a few meters to the right, but thats the
> > same
> > for any track (or a road with cycle lane). If you look on any map, you'll
> > see
> > that they draw a motorway or trunk road as one polyline, typically rendered
> > as
> > a colored line with a black line on each side and a black line in the
> > middle.
> > And if you are not confused yet, think about how to model exits and
> > motorway
> > links in this case.
> 
> Not strictly true, I know of several sections on dual carriageways (trunk and 
> primary not just motorways) where the carriageways are divergent by several 
> hundred meters, well beyond the margin of error for GPS. 

In that case they have to be split into two ways, of course. Very
similar to *_links now. Although I'd probably keep the way that
represents the motorway for rendering on scales where the differences
don't matter.

> Also with dual carriageways if entered as a single polyline how do you 
> differentiate between a side road that has access to both carriageways or a 
> side road that has access to just one of the carriageways or for that matter 
> a road which runs East/West forms a junction with a dualed road which runs 
> North/South: 2 polylines meeting at a node, but there is no crossover i.e. 
> someone coming from the West travelling East has to first travel North to the 
> next junction, then back south before rejoining the East/West road and 
> continuing eastward.  

Of course these are all problems and I am well aware of them. We have to
figure out a way how to do all this. But the current model *is*
defective. I don't have the right solution yet. Lets keep thinking.

Ok, here is a different way of thinking about all this:

We have two things here:
a) The polylines corresponding to features in reality
b) Objects representing logical entities like a road named x or the A1
   motorway

In many cases they are the same: You need a) and b) to render the road.
a) for the path it takes, b) for the color etc. But they don't have to
be.

You could have the following: A motorway which consists of path A, B, C
on one scale. If you zoom in, path B is replaced by path D northbound
and E southbound. And if you have a bus route along some part of the
motorway, its route object will share path A and B maybe.

Just a different way of thinking. Instead of thinking about ways and
their attributes, you think about objects which have attributes, some of
which are associated paths.

Jochen
-- 
Jochen Topf  jochen at remote.org  http://www.remote.org/jochen/  +49-721-388298





More information about the talk mailing list