read_geoibge-open-paren-close-paren: Get spatial data from IBGE

Description Usage Arguments Details Value Author(s) Examples

Description

Download, extract and import zipped shapefiles from ftp://geoftp.ibge.gov.br/

Usage

1
read_geoibge(layer, epsg = 31983)

Arguments

layer

a string defining url of zipped shapfile to get

epsg

a numeric value defining projection epsg code (default is 31983)

Details

read_geoibge will download and extract files in a temp directory. Files keep stored temporarily. To remove files from tmpdir, see clean_tmp.

Value

extrated files in temporary directory

Author(s)

Bruno Pinheiro

Examples

1
2
3
4
5
6
7
8
u1 <- "ftp://geoftp.ibge.gov.br/organizacao_do_territorio/malhas_territoriais/"
u2 <- "malhas_de_setores_censitarios__divisoes_intramunicipais/censo_2010/"
u3 <- "setores_censitarios_shp/al/al_municipios.zip"
get_ibge(paste0(u1, u2, u3))
layer <- list_tmp(".shp", full = FALSE)
layer <- gsub("\\.shp", "", layer)
st <- read_geoibge(layer)
clean_tmp()

bruno-pinheiro/seda documentation built on May 23, 2019, 1:59 a.m.