Skip to content

Instantly share code, notes, and snippets.

@mhkeller
Created December 10, 2012 02:28
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 mhkeller/4248031 to your computer and use it in GitHub Desktop.
Save mhkeller/4248031 to your computer and use it in GitHub Desktop.
Create multigeometry polygon in PostGIS / CartoDB
SELECT ST_Multi(ST_Union(the_geom)) as the_geom, cols... FROM (SELECT cartodb_id, cols...,
ST_Buffer(the_geom,0.0) as the_geom FROM table_name) as
buffered_table GROUP BY value_to_join_on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment