[postgis-users] Simplify a perfect (hierarchical) partition of polygons (ST_SimplifyPreserveTopology and friends)
tomkom at unimelb.edu.au
Sun Mar 11 18:40:24 PDT 2012
We are trying to generalise our polygon layers which contain sets of polygons that are perfect partitions of higher level polygons (think of counties in states which form together a country – a typical case of administrative hierarchies). The generalisation is only doen for a "view" geometry, we keep on doing our computations on the original geometries.
The reason is to make a more responsive JS based user interface with OpenLayers based map interaciton, including brushing etc.
The problem we are facing is that the ST_SimplifyPreserveTopology, while meant for Polygons, does not assure that the partition is preserved, and we end up with overlaps between the generalised polygons. What we currently do is:
SELECT AddGeometryColumn ('public','mytable','view_geom',4283,'GEOMETRY',2);
UPDATE mytable SET view_geom = ST_SimplifyPreserveTopology(wkb_geometry,0.1);
What is the best way to deal with this? I am sure many of you have faced this problem. Is there a way to detect the intersections of boudnaries of adjacent polygons and specify them as strict (immovable) vertices?
My other ideas include:
- Break the polygons into lines, so that the endpoints at intersections are immutable, and simplify and rebuild the polygons
- maybe try some tricks using the Postgis2.0 planar topology functions
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the postgis-users