[postgis-users] Topology and Triggers

Webb Sprague webb.sprague at gmail.com
Thu May 15 10:38:12 PDT 2008


On Thu, May 15, 2008 at 5:20 AM, George Silva <georger.silva at gmail.com> wrote:
> Hello all again,
>
> I´m curious. I´ve said in qgis list and some other 'desktop' GIS software
> lists that the biggest feature missing for OSGIS is something like the
> 'auto-complete' polygon in ArcGIS,, that would make life much easier.

Indeed!

> I´ve been reading some things, and i´ve seem people mentioning trigger based
> topology (eg cut out the overlaping area of digitized polygons, or,maintain
> only the overlaping areas of the digitized polygons, and other related
> issues).

I think the hard part is deciding how you want to do this exactly,
since all approaches involve changing the data somehow; a lot of
people are chary of automatically deleting gaps, for example, lest
they aren't really gaps (consider the Vatican Republic in  a map of
euro nations...).

> I imagine that would be a trigger using something like after insert update
> the_geom.
>
> Can you guys with more experience give me a example, so i can build my own?
> Best pratices? Some light around this subject?

Have you ever written a non-geo trigger in postgresql?  If not, I
would practice  using the docs; I am pretty sure you could just modify
NEW with a geo operator/ function.

If so, I think a larger scale project needs to be embarked on.  The
work so far seems to me to be quite low level without a grand plan,
and I think a grand plan is needed.  I would start with a bunch of
functions for modifying a geometry based on its neighbors and some
topology constraints, then maybe a schema to store topology
information, and only then start implementing triggers.  But this is
armchair quarterbacking--hopefully someone with some real experience
will say something...



More information about the postgis-users mailing list