Plot a resulting wind farm on a leaflet map.
plot_leaflet(result, Polygon1, which = 1, orderitems = TRUE, GridPol)
Returns a leaflet map.
The output of genetic_algorithm
The considered area as SpatialPolygon, SimpleFeature Polygon or coordinates as matrix/data.frame
A numeric value, indicating which individual to plot. The
default is 1. Combined with orderitems = TRUE
this will show the
best performing wind farm.
A logical value indicating whether the results should be
ordered by energy values TRUE
or chronologically FALSE
By default, the grid will be calculated based on the inputs
of result
and the Polygon1
. But another spatial object or the
output of the grid_area
or hexa_area
functions
can also be
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]]
)
}
Run the code above in your browser using DataLab