tylermorganwall / MusaMasterclass

My masterclass hosted by the Penn MUSA department on 3D mapping and visualization in R
https://upenn.hosted.panopto.com/Panopto/Pages/Viewer.aspx?id=ae6642b2-c2be-4ad0-846c-aafb00e00129
127 stars 51 forks source link

Error in hillshade #2

Open Joe-StPeter opened 3 years ago

Joe-StPeter commented 3 years ago

I hate to bother you, but I am running through this class, and thank you for it, and I am getting an error when I run the code: hobart_mat %>% lamb_shade(zscale = 33) %>% add_shadow(ray_shade(hobart_mat, zscale = 33, sunaltitude = 6, lambert = FALSE), 0.3) %>% plot_map()

This is the error message: Error in hillshade * t(scales::rescale(shadowmap[nrow(shadowmap):1, ], : non-conformable arrays

Here is my sessionInfo() R version 4.0.3 (2020-10-10) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 18363)

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] whitebox_1.4.0 rgdal_1.5-19 lubridate_1.7.9.2 suncalc_0.5.0
[5] spatstat.utils_1.20-2 rayrender_0.14.0 rayshader_0.19.2 ggplot2_3.3.3
[9] spatstat_1.64-1 rpart_4.1-15 nlme_3.1-149 spatstat.data_1.7-0
[13] raster_3.4-5 sp_1.4-5

Can you direct me how to solve this issue so that I can continue your tutorial?

cez2020 commented 3 years ago

I'm also following the tutorial (which is amazing, by the way) and am having the exact same problem. Everything worked until I got to this point.

This is my error message:

Error in hillshade * t(scales::rescale(shadowmap[nrow(shadowmap):1, ], : non-conformable arrays

Please help. Thank you!