Database Reference
In-Depth Information
The
ST_Union
functionconvertsthesediscreetbufferedpointsintoasinglerecord
with dissolved internal boundaries. To complete the clustering, we simply need to
use
ST_Dump
to convert these boundaries back to discreet polygons such that
we can utilize individual building footprints. Finally, we simplify the pattern with
ST_SimplifyPreserveTopology
and extract the external ring outside of these
polygons, using
ST_ExteriorRing
, which removes the holes inside the building
footprints.Since
ST_ExteriorRing
returnsaline,wehavetoreconstructourpoly-
gon.Weuse
chp04.polygonize_to_multi
,afunctionwewroteinthe
Improving
ST_Polygonize
recipe to handle just such occasions.