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
I noticed that st_sample() hangs indefinitely when the input geometry "covers the whole planet". Moreover, when I manually stop the code, R emits several warning messages like 1: In min(cc[[1]], na.rm = TRUE) : no non-missing arguments to min; returning Inf
Additional context
When running st_sample through the debugger, I noticed that the function internally calls st_poly_sample. When debugging st_poly_sample, I noticed that the function internally calls st_segmentize(x, units::set_units(1, "degree", mode = "standard")) which, for some reason I don't fully understand, modifies the input object in such a way that the xmax of the new bounding box is equal to -180:
Describe the bug
I noticed that
st_sample()
hangs indefinitely when the input geometry "covers the whole planet". Moreover, when I manually stop the code, R emits several warning messages like1: In min(cc[[1]], na.rm = TRUE) : no non-missing arguments to min; returning Inf
To Reproduce
If reporting a change from previous versions
Please read https://cran.r-project.org/web/packages/sf/news/news.html first.
Additional context
When running
st_sample
through the debugger, I noticed that the function internally callsst_poly_sample
. When debuggingst_poly_sample
, I noticed that the function internally callsst_segmentize(x, units::set_units(1, "degree", mode = "standard"))
which, for some reason I don't fully understand, modifies the input object in such a way that thexmax
of the new bounding box is equal to-180
:Created on 2024-02-05 with reprex v2.0.2
As a consequence,
a0
and alsosize
are then set equal to 0 (whatever is the original value).Session info
Created on 2024-02-05 with reprex v2.0.2
Session info
The text was updated successfully, but these errors were encountered: