Creates a bounding circle from the_geom_webmercator on cartodb
✓ Published0🌍 Public
Aandrewxhill
Last edited Feb 23, 2012
Created on Feb 23, 2012
This example shows a bounding circle generated around grouped point data, visualized as a single polygon overlay on a CartoDB map. It displays the spatial extent of each group by computing a circular buffer from the group’s centroid. The code uses PostGIS functions—`ST_Collect`, `ST_Envelope`, `ST_ConvexHull`, `ST_Centroid`, `ST_LongestLine`, and `ST_Buffer`—to derive the circle from the `the_geom_webmercator` column. The result is rendered as a geographic layer, with the circle’s radius determined by the longest distance from the centroid to the group’s convex hull.
AI-generated description