View source: R/SecondTrailsOpening.R
secondtrailsopening | R Documentation |
Starting from the main skidding trails, draw secondary skidding trails on the zones accessible to the machines, allowing to collect the selected trees with the chosen machines ("winching" argument). The layout is optimised to reduce the distance covered while respecting topographical constraints and avoiding trees to protect.
secondtrailsopening(
topography,
plotmask,
maintrails,
plotslope,
harvestablepolygons,
machinepolygons,
maintrailsaccess = NULL,
treeselectionoutputs,
scenario,
winching = NULL,
fuel = NULL,
verbose = FALSE,
advancedloggingparameters = loggingparameters()
)
topography |
Digital terrain model (DTM) of the inventoried plot (LiDAR
or SRTM) ( |
plotmask |
Inventoried plot mask (SpatialPolygonsDataFrame with a crs in UTM) |
maintrails |
Main trails defined at the entire harvestable area (sf linestring with a crs in UTM) |
plotslope |
Slopes (in radians) of the inventoried plot (with a
neighbourhood of 8 cells) (default:
|
harvestablepolygons |
Accessible zones of the inventoried plot
(default: |
machinepolygons |
Accessible zones for machines of the inventoried plot
(default: |
maintrailsaccess |
Access point of maintrail for each PU (prospection unit) (sf or sfc) |
treeselectionoutputs |
A list with:
|
scenario |
Logging scenario among: "RIL1", "RIL2broken", "RIL2", "RIL3", "RIL3fuel", "RIL3fuelhollow" or "manual"(character) (see the vignette) |
winching |
"0": no cable or grapple (trail to tree foot) "1": only cable (default = 40m) "2": grapple (default = 6m) + cable (grapple priority) If grapple + cable (winching = "2") without fuel wood (fuel = "0") recovery of the tree foot with grapple if possible (respected grapple conditions) otherwise with cable with angle to the trail. Avoidance of future/reserves if chosen. |
fuel |
Fuel wood exploitation: no exploitation = "0", exploitation of damage and unused part of logged trees for fuel = "1", exploitation of hollow trees, damage and and unused part of the log for fuel = "2". If fuel wood harvesting is chosen, these trails are preliminary, and the trails will be adjusted after tree felling for fuel wood recovery. The mortality of the trails is therefore not recorded at this stage |
verbose |
Allow to provide messages from internal functions (boolean) |
advancedloggingparameters |
Other parameters of the logging simulator
|
A list with :
inventory: Updated inventory
SmoothedTrails: Smoothed secondary trails (MULTIPOLYGON with crs)
TrailsDensity: Secondary trails density (in m/ha)
TrailsIdentity: Information on sections of the trails (matrix) with:
LineID:
LoggedTrees: idTree of trees reached by the trails
TypeExpl: type of winching
MainTrailsAccess: Random access point of main trail for each harvestable zone (sfc_POINT with crs)
RawSecondTrails: Non-smoothed secondary trails (SpatialLines with crs)
CostRasterAgg: The cost raster (RasterLayer with crs)
set.seed(1)
data(Paracou6_2016)
data(DTMParacou)
data(PlotMask)
data(SpeciesCriteria)
data(HarvestableAreaOutputsCable)
data(MainTrails)
scenario <- "manual"
winching <- "2"
objective <- 10
fuel <- "2"
diversification <- TRUE
inventory <- addtreedim(cleaninventory(Paracou6_2016, PlotMask),
volumeparameters = ForestZoneVolumeParametersTable)
treeselectionoutputs <- suppressWarnings(treeselection(inventory,
topography = DTMParacou,
speciescriteria = SpeciesCriteria,
scenario = "manual", objective = objective,
fuel = fuel,
diversification = diversification,
winching = winching,
specieslax = FALSE, objectivelax = TRUE,
harvestablearea = HarvestableAreaOutputsCable$HarvestableArea,
plotslope = HarvestableAreaOutputsCable$PlotSlope,
maintrails = MainTrails,
harvestablepolygons = HarvestableAreaOutputsCable$HarvestablePolygons,
advancedloggingparameters = loggingparameters()))
## Not run:
secondtrails <- secondtrailsopening(
topography = DTMParacou,
plotmask = PlotMask,
maintrails = MainTrails,
plotslope = HarvestableAreaOutputsCable$PlotSlope,
harvestablepolygons = HarvestableAreaOutputsCable$HarvestablePolygons,
machinepolygons = HarvestableAreaOutputsCable$MachinePolygons,
treeselectionoutputs = treeselectionoutputs,
scenario = "manual",
winching = winching,
fuel = "0",
advancedloggingparameters = loggingparameters())
## End(Not run)
data(SecondaryTrails)
library(ggplot2)
library(sf)
NewInventory <- SecondaryTrails$inventory
Harvestable <- sf::st_as_sf(
dplyr::filter(NewInventory, LoggingStatus == "harvestable"),
coords = c("Xutm", "Yutm")) %>%
st_set_crs(st_crs(SecondaryTrails$MainTrailsAccess))
HarvestableUp <- sf::st_as_sf(
dplyr::filter(NewInventory, LoggingStatus == "harvestableUp"),
coords = c("Xutm", "Yutm")) %>%
st_set_crs(st_crs(SecondaryTrails$MainTrailsAccess))
Selected <- sf::st_as_sf(
dplyr::filter(NewInventory, Selected == "1"), coords = c("Xutm", "Yutm")) %>%
st_set_crs(st_crs(SecondaryTrails$MainTrailsAccess))
Reserve <- sf::st_as_sf(
dplyr::filter(NewInventory, LoggingStatus == "reserve"),
coords = c("Xutm", "Yutm")) %>%
st_set_crs(st_crs(SecondaryTrails$MainTrailsAccess))
Future <- sf::st_as_sf(
dplyr::filter(NewInventory, LoggingStatus == "future"),
coords = c("Xutm", "Yutm")) %>%
st_set_crs(st_crs(SecondaryTrails$MainTrailsAccess))
ProbedHollow <- sf::st_as_sf(
dplyr::filter(NewInventory, ProbedHollow == "1"),
coords = c("Xutm", "Yutm")) %>%
st_set_crs(st_crs(SecondaryTrails$MainTrailsAccess))
VisibleDefect <- sf::st_as_sf(
dplyr::filter(NewInventory, VisibleDefect == "1"),
coords = c("Xutm", "Yutm")) %>%
st_set_crs(st_crs(SecondaryTrails$MainTrailsAccess))
ggplot() +
# Harvestable zones
geom_sf(data = HarvestableAreaOutputsCable$HarvestablePolygons,
fill = "olivedrab", alpha = 0.1) +
geom_sf(data = HarvestableAreaOutputsCable$MachinePolygons,
fill = "olivedrab", alpha = 0.5) +
labs(alpha = "Harvestable") +
labs(title = "Paracou P6 - secondary trails") +
geom_sf(data = VisibleDefect,
aes(colour = "Visible defect"), show.legend = "point") +
# geom_sf(data = Future,
# aes(colour = "Future"), show.legend = "point", size = 4) +
geom_sf(data = Reserve,
aes(colour = "Reserve"), show.legend = "point", size = 4) +
geom_sf(data = Harvestable,
aes(colour = "Harvestable"), show.legend = "point", size = 4) +
geom_sf(data = HarvestableUp,
aes(colour = "HarvestableUp"), show.legend = "point", size = 4) +
geom_sf(data = Selected,
aes(colour = "Selected"), show.legend = "point") +
geom_sf(data = ProbedHollow,
aes(colour = "Probed hollow"), show.legend = "point") +
# 2ndary trails
geom_sf(data = st_as_sf(SecondaryTrails$SmoothedTrails), col = "darkgreen") +
geom_sf(data = st_as_sf(SecondaryTrails$MainTrailsAccess), col = "black") +
scale_colour_manual(values = c("Visible defect" = "pink",
"Harvestable" = "skyblue", "HarvestableUp" = "blue", "Selected" = "red",
"Future" = "orange", "Reserve" = "purple", "Probed hollow" = "forestgreen",
"Second trails" = "darkgreen", "Harvestable area" = "olivedrab"))
SecondaryTrails$TrailsIdentity
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.