Skip to content

Instantly share code, notes, and snippets.

@booo
Created December 21, 2011 14:45
Show Gist options
  • Select an option

  • Save booo/1506273 to your computer and use it in GitHub Desktop.

Select an option

Save booo/1506273 to your computer and use it in GitHub Desktop.
SELECT
ST_ConvexHull(ST_Collect(planet_osm_point.way)) AS convexHull,
ST_Centroid(ST_ConvexHull(ST_Collect(planet_osm_point.way))) AS centroid
FROM
planet_osm_polygon,
planet_osm_point
WHERE
ST_DWithin(ST_Centroid(planet_osm_polygon.way), planet_osm_point.way, 2000)
AND
planet_osm_polygon.name = 'Erika-Hess-Eisstadion'
AND
planet_osm_point.amenity = 'restaurant';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment