Plot a resulting wind farm on a leaflet map.
Arguments
- result
The output of
genetic_algorithm
- Polygon1
The considered area as SpatialPolygon, SimpleFeature Polygon or coordinates as matrix/data.frame
- which
A numeric value, indicating which individual to plot. The default is 1. Combined with
orderitems = TRUE
this will show the best performing wind farm.- orderitems
A logical value indicating whether the results should be ordered by energy values
TRUE
or chronologicallyFALSE
- GridPol
By default, the grid will be calculated based on the inputs of
result
and thePolygon1
. But another spatial object or the output of thegrid_area
orhexa_area
functions can also be
Examples
if (FALSE) {
## Plot the best wind farm on a leaflet map (ordered by energy values)
plot_leaflet(result = resulthex, Polygon1 = sp_polygon, which = 1)
## Plot the last wind farm (ordered by chronology).
plot_leaflet(
result = resulthex, Polygon1 = 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, Polygon1 = sp_polygon, which = 1,
GridPol = Grid[[2]]
)
## Plot the last wind farm with hexagonal Grid
Grid <- hexa_area(sp_polygon, size = 75)
plot_leaflet(
result = resulthex, Polygon1 = sp_polygon, which = 1,
GridPol = Grid[[2]]
)
}