[geos-devel] Simplifying adjacent polygons

Martin Davis mbdavis at refractions.net
Wed Mar 19 18:21:47 EDT 2008

Chris has got it - the GEOS simplify won't do what you want, since it 
only simplies a single feature.  In order to do this, you would need to 
build a single-line coverage, simplify the edges of it, and then rebuild 
your polygons.

Chris Hodgson wrote:
> I think to do this correctly you need to have the concept of a 
> coverage, and the simplification algorithm needs to work on the 
> coverage. As it simplifies each edge in the coverage, it would need to 
> be aware that the edge is part of two faces, and check that it has to 
> maintain the validity of both polygons as it simplifies. I think this 
> would be a pretty significant development task.
> If your polygons aren't too tricky, you might be able to take a 
> simpler approach - intersect every polygon with it's neighbors and 
> create a new dataset of every line, with 2 additional attributes 
> specifying the IDs of the two polygons (faces) that shared that line 
> (edge). Then simplify each of these edge lines, and then rebuild your 
> polygons from the simplified edge lines. The problem being, there is 
> no guarantee that your polygon's topologies haven't been broken by the 
> simplification.
> I don't think your multi-geometry approach will work because I don't 
> believe that GEOS will treat the geometries inside the multi-geometry 
> any differently than if they were simplified separately - as you are 
> already doing. I haven't tried it or read the docs so I may be wrong.
> HTH.
> Chris
> Bill Zissimopoulos wrote:
>> Hello, list:
>> I am looking for a method to correctly simplify adjacent polygons
>> without leaving gaps between them or having them intersect after the
>> simplification. Currently my simple algorithm iterates over my
>> geometries and feeds them to GEOSTopologyPreserveSimplify separately;
>> obviously this is inadequate.
>> Is it possible to correctly simplify adjacent polygons in GEOS? One
>> technique I have been thinking about is to construct a multi-geometry
>> with all the geometries in my dataset and pass this multi-geometry to
>> GEOSTopologySimplify. Even if this worked, I would have to identify the
>> individual geometries in the resulting multi-geometry since they
>> represent different features in the original dataset. For example, a
>> lake polygon and a land polygon next to it would have to be identified
>> again after simplification so they can be properly rendered.
>> The solution here might be to abuse slightly the z coordinate to store
>> tagging information about individual polygons. But I wanted to hear any
>> comments from the experts on the list before I attempt this.
>> Your comments will be very much appreciated.
>> Bill
>> _______________________________________________
>> geos-devel mailing list
>> geos-devel at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geos-devel
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel

Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

More information about the geos-devel mailing list