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
Describe the bug
The presence of an empty geometrycollection causes st_collection_extract()to return an empty object even if geometries of the requested type are present.
Describe the bug
The presence of an empty geometrycollection causes
st_collection_extract()
to return an empty object even if geometries of the requested type are present.For geometrycollections,
st_cast_sfc_default()
checks forall(lengths(x))
https://github.com/r-spatial/sf/blame/7bf3b66cec65ef21ee580926cb69444af7f3a931/R/cast_sfc.R#L125 which is false if there is an empty geometrycollection. Thus, the object is not unlisted and everything gets removed because nothing appears to be correctly identified.This appears to be related to issue #1767 and commit 9237639
Thanks!
To Reproduce
Created on 2024-03-22 with reprex v2.1.0
Additional context
Created on 2024-03-22 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: