Closed HenrikBengtsson closed 2 years ago
There's a similar problem with render_label()
. The patch is:
diff --git a/R/render_label.R b/R/render_label.R
index 7dbb76b..240f005 100644
--- a/R/render_label.R
+++ b/R/render_label.R
@@ -115,7 +115,7 @@ render_label = function(heightmap, text, lat, long, altitude=NULL, extent=NULL,
z = altitude
}
if(is.null(z)) {
- z = max(heightmap)*1.1
+ z = max(heightmap,na.rm=TRUE)*1.1
}
if(is.null(extent) && (!missing(lat) || !missing(long)) && (!is.null(x) && !is.null(y))) {
stop("extent required when using lat/long instead of x/y")
Thanks for the bug report! This will be fixed in the next update.
Fixed in 89119188054b9c38c09b49ffdc28a6d632f24f3f.
Issue
render_compass()
may silently return without generating a compass. A reproducible example is:Attachment: dem.zip -
dem.rds
in case online data changes.Troubleshooting
After some debugging, I tracked it down to one of the (x,y,z) coordinates passed to rgl is NaN, which can be seen as:
Patch
I think there's a missing
na.rm = TRUE
forrange()
when calculatingxyz_range
;Session info
I'm using rayshader from GitHub:
with
BugWhisperingAsUsual