[OSM-talk] Topology (was: OSM the mediocre alternative)

Schuyler Erle schuyler at nocat.net
Fri Apr 27 05:40:19 BST 2007


* On 26-Apr-2007 at  8:50AM PDT, Artem Pavlenko said:
> >
> >Is there a particular reason why we need PostGIS topology?
> 
> Collecting and storing topological structure would be very useful.  
> But, do we need PostGIS topology?  I'm not sure.

It's a moot point. crschmidt and I took a look at PostGIS topology
today, and it seems to have gaping holes, to the point of non
functionality.

> >If we store ways as arrays of node IDs and index them (which can be
> >done in standard postgres) you get almost all the way. Add a
> >trigger to automatically regenerate the polyline wherever the array
> >changes and it should work just fine.
> 
> I don't believe that storing every single node as a separate record
> (object) would be a good idea. Some geometries can have lots of
> vertices and gathering them by id won't efficient. Only
> 'interesting'  nodes e.g intersections need to be stored, IMHO.

I have been exploring something very like this, using a single table
in PostGIS to hold all topological elements and the relationships
between them, plus summary geometries for each one, maintained by
database rules (similar to triggers). The key thing to note is that
edges in the topology would be linestrings, not just segments, which
would cut down on the number of unnecessary nodes.

I haven't gotten it working yet, but I think it should scale pretty
far. I would then define objects in terms which topological elements
they refer to, which I think fixes some of the edge splitting problems
Frederik and Jochen referred to.

I am finishing up a six page reply to Jochen and Frederik et al.
Please contact me if you want to see a draft; I don't want to step on
any toes by publishing possibly ill-considered opinions too widely
just yet. The relative uselessness of PostGIS topologies has led me to
rethink some of my recommendations.

Gigabase looks very intriguing, though...

SDE




More information about the talk mailing list