library(sf)
## Exemplary input Polygon with 2km x 2km:
Polygon1 <- sf::st_as_sf(sf::st_sfc(
sf::st_polygon(list(cbind(
c(4498482, 4498482, 4499991, 4499991, 4498482),
c(2668272, 2669343, 2669343, 2668272, 2668272)
))),
crs = 3035
))
## Create a random windfarm with 10 turbines
t <- st_coordinates(st_sample(Polygon1, 10))
t <- cbind(t, "Z" = 1)
wnkl <- 20
dist <- 100000
## Evaluate and plot for every turbine all other potentially influencing turbines
potInfTur <- list()
for (i in 1:(length(t[, 1]))) {
potInfTur[[i]] <- get_dist_angles(
t = t, o = i, wnkl = wnkl,
dist = dist, polYgon = Polygon1, plotAngles = TRUE
)
}
potInfTur
Run the code above in your browser using DataLab