Database Reference
In-Depth Information
sion—the
ST_SimplifyPreserveTopology
function—thatwillproduceonlyvalid
geometries.
While the functions are working well with (multi) linear geometries, in the case of
(multi)polygons,theywillmostlikelycreatetopologicalanomalies,suchasoverlaps
and holes, at shared polygon borders.
Togetavalid,topologicallysimplifieddataset,therearethefollowingtwochoicesat
the time of this writing:
• Performing the simplified process on an external GIS tool such as
GRASS
• Using the new PostGIS topological support
WhileyouwillseethenewPostGIStopologicalfeaturesinafollowingrecipe,inthis
one, you have been using
GRASS
to perform the simplification process.
Weopened
GRASS
,createdaGISdatadirectoryandaprojectlocation,andthenim-
portedinthe
GRASS
locationthepolygonalPostGIStableusingthe
v.ogr.in
com-
mand, based on GDAL/OGR, as the name suggests.
Until this point, you have been using the
GRASS v.generalize
command to per-
form the simplification of the dataset using a tolerance (threshold) expressed in
meters.
After simplifying the dataset, you have imported it back to PostGIS using the
v.ogr.out GRASS
command and then opened the derived spatial table in a
DesktopGIStoseewhetherornottheprocesswasperformedinatopologicallycor-
rect way.