[postgis-users] Simplify borders
Frederik Ramm
frederik at remote.org
Fri Dec 10 00:20:41 PST 2010
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.
Bye
Frederik
More information about the postgis-users
mailing list