# NOT RUN {
library(sp)
library(raster)
## Exemplary input Polygon with 2km x 2km:
polYgon <- Polygon(rbind(c(0, 0), c(0, 2000), c(2000, 2000), c(2000, 0)))
polYgon <- Polygons(list(polYgon),1)
polYgon <- SpatialPolygons(list(polYgon))
Projection <- "+init=epsg:3035"
proj4string(polYgon) <- CRS(Projection); plot(polYgon, axes = TRUE)
## Create a random windfarm with 10 turbines
t <- as.matrix(cbind(x = runif(10, 0, raster::extent(polYgon)[2]),
y = runif(10, 0, raster::extent(polYgon)[4])))
wnkl <- 20
distanz <- 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, wkl = wnkl,
distanz = distanz, polYgon = polYgon, plotAngles = TRUE)
}
potInfTur
# }
Run the code above in your browser using DataLab