Skip to content

Instantly share code, notes, and snippets.

@wboykinm
Created May 14, 2013 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wboykinm/5576939 to your computer and use it in GitHub Desktop.
Save wboykinm/5576939 to your computer and use it in GitHub Desktop.
Big call
https://dai.cartodb.com/tiles/oriental_2012/10/505/405.png?sql=WITH%20hgrid%20AS%20(SELECT%20CDB_HexagonGrid(ST_Expand(CDB_XYZ_Extent(505%2C405%2C10)%2C%20CDB_XYZ_Resolution(10)%20*%2015)%2C%20CDB_XYZ_Resolution(10)%20*%2015)%20as%20cell)%20SELECT%20hgrid.cell%20as%20the_geom_webmercator%2C%20count(i.cartodb_id)%20as%20points_count%2C%20count(i.cartodb_id)%2Fpower(%2015%20*%20CDB_XYZ_Resolution(10)%2C%202%20)%20as%20points_density%2C%201%20as%20cartodb_id%20FROM%20hgrid%2C%20(select%20*%20from%20oriental_2012)%20i%20where%20ST_Intersects(i.the_geom_webmercator%2C%20hgrid.cell)%20GROUP%20BY%20hgrid.cell&cache_policy=persist&cache_buster=1368545928647&map_key=29b6c988bace9a9ee5ac284f6926b918ac5415f0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment