ipeaGIT / geobr

Easy access to official spatial data sets of Brazil in R and Python
https://ipeagit.github.io/geobr/
786 stars 118 forks source link

Error - municipalities not connected #301

Closed serenini closed 1 year ago

serenini commented 1 year ago

I've downloaded the shapefile of 2010 and created a Spatial contiguity matrix and noticed some errors: It seems there are gaps between some features, so the municipalities are considered as neighbors ( in case of contiguity). For instance: Caroebe (RR) and Oriximiná (PA). This gap was found totally by accident and I didn't check others (just some as a small random sample).

I'm not sure if this issue should be directed here or to IBGE, but I thought you should be informed of that.

rafapereirabr commented 1 year ago

Hi @serenini . I suspect you downloaded the data without setting the parameter simplify = FALSE. Pleas try with this code and let me know if the problem persists.

df <- geobr::read_municipality(
              code_muni = 'all', 
              year=2010, 
              simplified = FALSE
              )
serenini commented 1 year ago

@rafapereirabr it seems it's working now. Thank you!