[postgis-users] Simplifying a multipolygon layer, keeping polygon connection

Sandro Santilli strk at keybit.net
Fri Apr 13 05:42:26 PDT 2012


On Wed, Apr 11, 2012 at 02:59:41PM +0200, Sandro Santilli wrote:

> Alternatively you could still construct the topology with full-precision
> edges and then simplify the edges in-place (possibly after a CopyTopology),
> using ST_ChangeEdgeGeom. That way the _original_ nodes will remain the same
> and you'd be only simplifying the edges connecting them. Beware in this
> case that simplification might still introduce topology errors but such
> errors would be cought by ST_ChangeEdgeGeom with throwing an exception.
> 
> You may catch the exception to reduce tolerance for a given edge or bypass
> all checks by editing the edge_data table directly and cross your fingers :)
> ValidateTopology should then tell you what you broke, if you want to fix
> manually after the fact.

FYI, I wrote a blog post showcasing this approach (with code):

http://strk.keybit.net/blog/2012/04/13/simplifying-a-map-layer-using-postgis-topology/

--strk;

  ,------o-. 
  |   __/  |    Delivering high quality PostGIS 2.0 !
  |  / 2.0 |    http://strk.keybit.net - http://vizzuality.com
  `-o------'




More information about the postgis-users mailing list