Skip to content

Instantly share code, notes, and snippets.

@jatorre
Created November 1, 2011 20:38
Show Gist options
  • Save jatorre/1331829 to your computer and use it in GitHub Desktop.
Save jatorre/1331829 to your computer and use it in GitHub Desktop.
#run this on your map of points
SELECT ST_Transform(ST_ConvexHull(ST_Collect(the_geom)),3857) AS the_geom_webmercator FROM my_spottings
(adjust)
#Change the style to Custom CartoCSS because now you need to apply a polygon style as you are no longer visualizing points
#my_spottings{
polygon-fill:#FFCC00;
polygon-opacity:0.49;
line-opacity:0.49;
line-color:#FF3366;
line-width:2;
}
In the future we will have mixed geometries in columns and you would not have to do some of this tricks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment