-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
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
Invalid geometry for Amazônia in read_biomes #361
Comments
Try using
|
Ah sorry! I copy-pasted the wrong version, lack of attention there. It's actually the opposite. I had switched to The problem I mentioned only appears when I use I basically want which biomes are in each municipality, so I imagine using |
Could you please share the code to reproduce the error ? |
Sure! I'm sending a PDF knit of the code, in R. Essentially, I'm running:
And doing:
Which yields this error:
I think more details can be seen in the file |
Hi @OlivazShai , thanks for reporting this issue. This is a problem with the original data set made publicly available by IBGE on the http: 'https://geoftp.ibge.gov.br/informacoes_ambientais/estudos_ambientais/biomas/vetores/Biomas_250mil.zip' I haven't found a way to fix this topology error yet. I wanntry dissolving borders a fast approach like this one but I haven't found the time to test it yet. |
Thanks a lot for the help! Let me know if you find a solution, or if IBGE updates their data. I'm currently using the simplified polygons, which seem to suffice for my analysis by municipality. If/when I switch to a more granular approach I'll probably have to look for some workarounds, I'll let you know if I reach any usable solution too. By the way, IBGE issued recently (like, two weeks ago) a list of municipalities by predominant biome, which is kind of what I was looking for. And there also is an older list, from 2019, with a slighly different approach. They're available at https://geoftp.ibge.gov.br/informacoes_ambientais/estudos_ambientais/biomas/documentos/ It's a simple table and very tractable as it is, but seems like it could be a nice addition to the |
As an update, I checked turning off After doing so, running:
Retuns Not ideal, though... |
When running:
read_biomes( year = 2019, simplified = TRUE )
The geometry for the Amazon is invalid, which makes it impossible to perform intersections and other operations. When running:
st_is_valid(reason=TRUE)
We get following result, for Amazon:
"Loop 114: Edge 168413 crosses edge 168418"
Applying st_make_valid doesn't solve the issue, for some reason...
The text was updated successfully, but these errors were encountered: