ipeaGIT / geobr

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

Wrong weird shape for Barra Do Brugres municipality #365

Closed jaum20 closed 1 month ago

jaum20 commented 1 month ago

The following code plots the Mato Grosso state and highlits the municipality of Barra Do Bugres.

library(geobr)
library(ggplot2)

mt_muni = read_municipality(code_muni = "MT", year= 2022, showProgress = FALSE)

ggplot()+
  geom_sf(data=mt_muni,fill='cornsilk', colour='black') +
  geom_sf(data=mt_muni[mt_muni$name_muni=='Barra Do Bugres',], fill='red', colour=NA)+
  theme_void()

But the shape looks wrong, with disconected polygons:

image

The municipality boundaries according to wikipedia are different:

image

Is this a bug ?

jaum20 commented 1 month ago
ggplot()+
  geom_sf(data=mt_muni[mt_muni$name_muni=='Barra Do Bugres',], fill='red', colour='black)+
  theme_void()

image

rafapereirabr commented 1 month ago

Thaks for the heads up! This seems to be an error with IBGE's original data set. Here, have a look at the 2022 shape file. The map of Barra do Bugres also looks like this in the original data for other years as well.

Google maps also uses the same shape (see here). Perhaps the odd shape is the one present on wikipedia?

jaum20 commented 1 month ago

Looks like the IBGE map is right. Found this thread at reddit about the municipality. https://www.reddit.com/r/brasilivre/comments/k5uyvu/o_inusitado_mapa_de_barra_do_bugres_mt_uma_cidade/

Thanks for your time. Closing this