[postgis-users] Simplify borders

strk strk at keybit.net
Fri Dec 10 02:54:58 PST 2010

On Fri, Dec 10, 2010 at 09:20:41AM +0100, Frederik Ramm wrote:
> John,
> On 12/10/10 00:04, John Abraham wrote:
> >I'm sure this is a common problem, but I haven't been able to figure
> >out how to do it in PostGIS.
> One way to do it - used by me in the past, but I have no clue if this is 
> the best or even an usual way - is to switch your model from "one 
> polygon per zone" to "a number of border lines, each dividing two 
> zones". This can easily be accomplished by intersecting each polygon 
> with all others (the outer boundaries of the region will require special 
> handling but not too difficult either). Resulting line geometries must 
> have two columns "zone1" and "zone2" that tell you which zones are 
> divided by that line.
> Then you can simplify the resulting mesh of lines to your heart's 
> content, provided that the simplification algorithm does not change the 
> first and last point.
> Afterwards, for each zone you collect all lines that have the zone id in 
> "zone1" or "zone2" into a (multi)polygon, and there you are. This 
> process ensures that there will never be any no man's land or overlap 
> between zones.

I'd recommend looking at the postgis topology model for this.
"zones" would be "faces".
You could simplify whole topologies and automatically find that
simplification in all TopoGeometry objects defined by their
topological primitives.


  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html

More information about the postgis-users mailing list