Skip to content

Instantly share code, notes, and snippets.

@booo
Created March 7, 2012 00:50
Show Gist options
  • Select an option

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

Select an option

Save booo/1990168 to your computer and use it in GitHub Desktop.
SELECT * INTO postcodes_convex FROM
(SELECT ST_ConvexHull(ST_Collect(geom)) AS geom, tags->'addr:postcode' AS postal_code
FROM nodes
WHERE tags ? 'addr:postcode' GROUP BY postal_code) AS foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment