Plot a resulting wind farm on a leaflet map. Wakes are
downwind cones (Jensen search angle), not circles. Terrain rasters
from result$terrainModel are optional overlay layers.
Usage
plot_leaflet(
result,
area,
which = 1,
orderitems = TRUE,
grid = NULL,
wind = NULL,
terrain = NULL
)Arguments
- result
The output of
genetic_algorithm- area
Site polygon (
sf, SpatialPolygons, or coordinate matrix). Must be projected in metres.- which
A numeric value, indicating which individual to plot. The default is 1. Combined with
orderitems = TRUEthis will show the best performing wind farm.- orderitems
A logical value indicating whether the results should be ordered by energy values
TRUEor chronologicallyFALSE- grid
Optional grid polygons. By default they are rebuilt from
resultandarea. You can pass the polygon element ofgrid_area()orhexa_area().- wind
Optional wind table (
ws,wd,probab). Defaults to the table stored inresult.- terrain
Optional output of
leaflet_prepare_terrain(). Defaults toresult$terrainModelwhen present.
Examples
if (FALSE) { # \dontrun{
## Plot the best wind farm on a leaflet map (ordered by energy values)
plot_leaflet(result = resulthex, area = sp_polygon, which = 1)
## Plot the last wind farm (ordered by chronology).
plot_leaflet(
result = resulthex, area = sp_polygon, orderitems = FALSE,
which = 1
)
## Plot the best wind farm on a leaflet map with the rectangular Grid
Grid <- grid_area(sp_polygon, size = 150, prop = 0.4)
plot_leaflet(
result = resultrect, area = sp_polygon, which = 1,
grid = Grid[[2]]
)
## Plot the last wind farm with hexagonal Grid
Grid <- hexa_area(sp_polygon, size = 75)
plot_leaflet(
result = resulthex, area = sp_polygon, which = 1,
grid = Grid[[2]]
)
} # }