Escolar Documentos
Profissional Documentos
Cultura Documentos
POPULAR MULTIPONTO
INSERT INTO MULTIPONTO VALUES (1, 'MP1', ST_GeomFromText('MULTIPOINT( 1 1, 5 5 , 3
4, 2 1 )', 4618))
select *
from multipoligono
where not st_isvalid(local)
CRIANDO COLE��O
SELECT postgis_full_version();
Criando uma tabela com coluna geom�trica (feature table ou tabela com fei��es)
ou
EXPLAIN ANALYZE
SELECT m.gid, m.nome_munic, COUNT(*) AS num_focos, m.geom
FROM ba_municipios m, focos f
WHERE ST_Contains(m.geom, ST_Transform(f.geom, 4674))
GROUP BY m.gid, m.nome_munic
--ORDER BY num_focos DESC
--LIMIT 1;
EXPLAIN ANALYZE
SELECT m.gid, m.nome_munic, COUNT(*) AS num_focos, m.geom
FROM ba_municipios m, focos f
WHERE ST_Within(ST_Transform(f.geom, 4674), m.geom)
GROUP BY m.gid, m.nome_munic
--ORDER BY num_focos DESC
--LIMIT 1;
EXPLAIN ANALYZE
SELECT m.gid, m.nome_munic, COUNT(*) AS num_focos, m.geom
FROM ba_municipios m, focos f
WHERE ST_Within(f.geom, ST_Transform(m.geom, 4618))
GROUP BY m.gid, m.nome_munic
--ORDER BY num_focos DESC
--LIMIT 1;