# NOT RUN {
library(raster)
library(sf)
Polygon1 <- sf::st_as_sf(sf::st_sfc(
sf::st_polygon(list(cbind(
c(4496482, 4496482, 4499991, 4499991, 4496482),
c(2666272, 2669343, 2669343, 2666272, 2666272)))),
crs = 3035
))
DEM_meter <- getDEM(Polygon1)
turbloc = st_sample(DEM_meter[[2]], 10, type = "random");
res <- viewshed(r = DEM_meter[[1]], shape = DEM_meter[[2]], turbine_locs = turbloc,
h1 = 1.8, h2 = 50)
plot_viewshed(res)
## ... Arguments are past on to raster::plot
plot_viewshed(res, legend = TRUE, interpolate=TRUE, colNA="black",
col = topo.colors(15))
# }
Run the code above in your browser using DataLab