Database Reference
In-Depth Information
ST_SimplifyPreserveTopology(ST_Transform(the_geom,
2163), 500) FROM states;
3. The previous command works quickly, using some variant of the Douglas-
Peucker algorithm, and effectively reduces the vertex number. But the res-
ulting polygons, in some cases, are not adjacent any more. If you zoom in
at any polygon border, you should notice something similar to that which is
shown in the following screenshot. There are holes and overlaps along the
sharedborderbetweentwopolygons.ThisisbecausePostGISisusingthe
OGC Simple Features Specification model, which doesn't implement topo-
logy,sothefunctionjustremovestheredundantvertexwithouttakingthead-
jacent polygons into consideration:
4. Itlookslikethe ST_SimplifyPreserveTopology function,whileworking
well with linear features, produces topological anomalies with polygons.
In the event that you want topological simplification, another approach is
to utilize the following code suggested by Paul Ramsey ( ht-
tp://gis.stackexchange.com/questions/178/simplifying-adjacent-polygons ) ,
and improved in a Webspaces blog post ( http://webspaces.net.nz/
page.php?view=polygon-dissolve-and-generalise ) :
SET search_path TO chp03, public;
-- first project the spatial table to a
planar system (recommended for
Search WWH ::




Custom Search