Open ppKrauss opened 8 years ago
@ppKrauss , comecei a prototipar a importacao, ate agora tenho o seguinte
:: downloading, unziping, organizing
cd ~/Desktop/base_de_faces_de_logradouros
wget -r -nd -nc --read-timeout=5 ftp://geoftp.ibge.gov.br/recortes_para_fins_estatisticos/malha_de_setores_censitarios/censo_2010/base_de_faces_de_logradouros/
:: had excute the command a couple times to make sure all files were downloaded
:: downloads 10,909 .zip files, totalling 1.9 GB
unzip '*.zip'
mkdir setor
mkdir face
mkdir zips
find -type f -name '*.setor*' -exec mv -i {} -t ~/Desktop/base_de_faces_de_logradouros/setor \;
find -type f -name '*.face*' -exec mv -i {} -t ~/Desktop/base_de_faces_de_logradouros/face \;
find -type f -name '*.zip*' -exec mv -i {} -t ~/Desktop/base_de_faces_de_logradouros/zips \;
:: after unzip, the face .shp files take 3.8Gb, the setor .shp files take 1.2Gb
:: loading into Postgis
cd face
:: First create an empty table
shp2pgsql -p -s 4674:4326 -I -W LATIN1 11000150500_face test1.CNEFE_face_quadra3 | psql -h server -p porta -d dados_espaciais
::load all files into it
for f in *.shp
do shp2pgsql -a -s 4674:4326 -I -W LATIN1 $f test1.CNEFE_face_quadra3 | psql -h server -p porta -d dados_espaciais
done
https://lists.openstreetmap.org/pipermail/talk-br/2016-July/011502.html
"IBGE disponibiliza Base de Faces de Logradouros do Censo 2010", http://saladeimprensa.ibge.gov.br/noticias?view=noticia&id=1&busca=1&idnoticia=3213