Forked from andrewxhill/bounding circle on cartodb
Created
February 23, 2012 16:29
-
-
Save saleiva/1893564 to your computer and use it in GitHub Desktop.
Creates a bounding circle from the_geom_webmercator on cartodb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
ST_Buffer( | |
st_centroid(ST_Union(the_geom_webmercator)), | |
st_distance( | |
st_centroid(ST_Union(the_geom_webmercator)), | |
ST_EndPoint(ST_LongestLine( | |
ST_Union(the_geom_webmercator), | |
ST_Union(the_geom_webmercator) | |
)) | |
) | |
) as the_geom_webmercator | |
FROM table_name GROUP BY some_column |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment