We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usando mapa oficial do IBGE de 2017.
CREATE FUNCTION lib.id_ibge2uf(p_id text) REtURNS text AS $$ SELECT ('{ "12":"AC", "27":"AL", "13":"AM", "16":"AP", "29":"BA", "23":"CE", "53":"DF", "32":"ES", "52":"GO", "21":"MA", "31":"MG", "50":"MS", "51":"MT", "15":"PA", "25":"PB", "26":"PE", "22":"PI", "41":"PR", "33":"RJ", "24":"RN", "11":"RO", "14":"RR", "43":"RS", "42":"SC", "28":"SE", "35":"SP", "17":"TO" }'::jsonb)->>$1 $$ language SQL immutable; SELECT a_nm, array_to_string(array_agg(b_nm),' ') faz_fronteira_com FROM ( SELECT DISTINCT a_nm, b_nm FROM ( SELECT lib.id_ibge2uf(a.cd_geocuf) a_nm, lib.id_ibge2uf(b.cd_geocuf) b_nm, ST_Relate(a.geom,b.geom) rel FROM brufe250gc_sir a, brufe250gc_sir b WHERE a.cd_geocuf!=b.cd_geocuf AND a.geom && b.geom ) t WHERE rel!='FF2FF1212' ORDER BY 1,2) tt group by 1 order by 1
Pode-se conferir os valores rel com a função lib.ST_Relate_summary().
rel
PS: as relações são reduzidas a interseções de área com st_buffer(a.geom,0.0001), restando 51 casos de interseção tipo rel='212101212'.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Usando mapa oficial do IBGE de 2017.
Pode-se conferir os valores
rel
com a função lib.ST_Relate_summary().PS: as relações são reduzidas a interseções de área com st_buffer(a.geom,0.0001), restando 51 casos de interseção tipo rel='212101212'.
The text was updated successfully, but these errors were encountered: