Tilemill PostGIS layer subquery showing layer clipping via polygon intersection.
✓ Published0🌍 Public
CCaged
Last edited Sep 14, 2013
Created on Sep 14, 2013
This example demonstrates how to clip building footprint data to a specific neighborhood boundary using a spatial intersection query in Tilemill. The visualization shows only the buildings that fall within the LAURELHURST neighborhood, with their geometries trimmed to the neighborhood polygon’s edge. The underlying SQL query joins the `buildings` and `neighborhoods` tables via PostGIS’s `ST_Intersects` function, selecting the boundary polygon as `bounding_area`. The map renders the resulting clipped layer, effectively masking out any building portions that extend beyond the neighborhood’s borders. This technique is useful for isolating features within a defined administrative or custom area.
AI-generated description