Skip to content

Instantly share code, notes, and snippets.

@nerik
Created March 21, 2016 15:07
Show Gist options
  • Save nerik/ba49e6ced4d52e210be5 to your computer and use it in GitHub Desktop.
Save nerik/ba49e6ced4d52e210be5 to your computer and use it in GitHub Desktop.
SXSW SQL
WITH iso_walk AS (
SELECT
name,
cdb_isochrone(
the_geom,
‘walk’,
Array[120,300,600,900,1200,1800]
) isochrone
FROM nerikcarto.sxsw_venues
)
INSERT INTO
nerikcarto.sxsw_iso
(type, name, the_geom, data_range, the_geom_webmercator)
SELECT
‘walk’ as type,
iso_walk.name,
(iso_walk.isochrone).the_geom,
(iso_walk.isochrone).data_range,
ST_Transform(
(iso_walk.isochrone).the_geom,
3857
) as the_geom_webmercator
FROM iso_walk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment