Skip to content

Instantly share code, notes, and snippets.

@gledsoncruz
Last active August 29, 2015 13:58
Show Gist options
  • Save gledsoncruz/9993753 to your computer and use it in GitHub Desktop.
Save gledsoncruz/9993753 to your computer and use it in GitHub Desktop.
SQL Postgis para gerar um poligono com a união de 2 ou mais
INSERT INTO setores_op(descricao, the_geom) VALUES ('Setor 6',
(SELECT ST_Union(ARRAY(SELECT the_geom FROM bairros WHERE gid IN (22,23)))));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment