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

Jose Carlos Martinez jomarlla at cgf.upv.es
Fri Apr 13 06:28:25 PDT 2012


nice example,
these kind of examples show the power of the  persistent topology.
thanks to make it.


On 13/04/2012 14:42, Sandro Santilli wrote:
> 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------'
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list