You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found that rbindlist{data.table} somehow changes the bouding box of spatial sf objects. This is related to issue #2273 here, and I've linked to issues on geobr and tmap packages as well.
This is a known limitation of data.table. See #4415 for a discussion of why this occurs. The gist is the following: As you are aware bbox is stored as an attribute of geom and depends on the values of that vector. No data.table function ever touches these attributes. When you call subset() it actually ends up falling back on the data.frame method which calls c() which in turn recomputes the bbox. That's why it fixes it.
Sorry for the question: I also use data.table rbindlist to bind two multipolygon sf objects together. Does this mean the boundingbox of the new layer is always messed up after this and I have to run the subset command as a fix? Thank you!
I've found that
rbindlist{data.table}
somehow changes the bouding box of spatialsf
objects. This is related to issue #2273 here, and I've linked to issues on geobr and tmap packages as well.Minimal reproducible example
For some reason, though, this problem is fixed when I run a simple subset removing a row hat does not exist in the data.
sessionInfo()
The text was updated successfully, but these errors were encountered: