How it works...

To put it informally, our buffering technique effectively lumps together or clusters adjacent samples. This is possible only because we have regularly sampled data, but that is OK. The density and scan patterns for the LiDAR data are typical of such datasets, so we can expect this approach to be applicable to other datasets.

The ST_Union function converts these discreet buffered points into a single record with dissolved internal boundaries. To complete the clustering, we simply need to use ST_Dump to convert these boundaries back to discreet polygons so that we can utilize individual building footprints. Finally, we simplify the pattern with ST_SimplifyPreserveTopology and extract the external ring, or use ST_ExteriorRing ...

Get PostGIS Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.