Skip to contents

In the FWE (Fuel Wood Exploitation) case, the layout of the skidding trails is redefined to favour the recovery of trees through the crown (only with a grapple) in order to use the crowns for fuel wood.

Usage

secondtrailsadjusted(
  inventory,
  topography,
  plotmask,
  maintrails,
  plotslope,
  harvestablepolygons,
  machinepolygons,
  maintrailsaccess = NULL,
  scenario,
  winching = NULL,
  verbose = FALSE,
  advancedloggingparameters = loggingparameters()
)

Arguments

inventory

Input inventory with new columns:

  • The tree felling success or fail("TreeFellingOrientationSuccess")

  • The crowns of the future/reserve trees (Polygon)

  • The fallen trees ("TreePolygon"): a MULTIPOLYGON of the tree oriented according to the chosen scenario

  • The dead trees under felled trees (DeathCause = "treefall2nd")

topography

Digital terrain model (DTM) of the inventoried plot (LiDAR or SRTM) (DTMParacou) (RasterLayer with a crs in UTM)

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: HarvestableAreaOutputsCable) (RasterLayer with a crs in UTM)

harvestablepolygons

Accessible zones of the inventoried plot (default: harvestableareadefinition) (sfc_MULTIPOLYGON)

machinepolygons

Accessible zones for machines of the inventoried plot (default: harvestableareadefinition) (sf polygons data.frame)

maintrailsaccess

Access point of maintrail for each PU (prospection unit) (sf or sfc)

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.

verbose

Allow to provide messages from internal functions (boolean)

advancedloggingparameters

Other parameters of the logging simulator loggingparameters (list)

Value

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)

Examples

if (FALSE) { # \dontrun{
data(DTMParacou)
data(PlotMask)
data(HarvestableAreaOutputsCable)
data(SecondaryTrails)

scenario <- "manual"
winching <- "2"
fuel <- "2"
directionalfelling <- "2"

PostLogInventory <- treefelling(SecondaryTrails$inventory, scenario = scenario,
fuel = fuel,
winching = winching,
directionalfelling = directionalfelling,
maintrailsaccess = SecondaryTrails$MainTrailsAccess,
scndtrail = SecondaryTrails$SmoothedTrails,
advancedloggingparameters = loggingparameters())

ScdTrailsAdj <- secondtrailsadjusted(
  inventory = PostLogInventory,
  topography = DTMParacou,
  plotmask = PlotMask,
  maintrails = MainTrails,
  plotslope = HarvestableAreaOutputsCable$PlotSlope,
  harvestablepolygons = HarvestableAreaOutputsCable$HarvestablePolygons,
  machinepolygons = HarvestableAreaOutputsCable$MachinePolygons,
  maintrailsaccess = SecondaryTrails$MainTrailsAccess,
  scenario = scenario,
  winching = winching,
  advancedloggingparameters = loggingparameters())


library(ggplot2)
library(sf)

NewInventory <- PostLogInventory
NewInventory_crs <- PostLogInventory %>%
getgeometry(TreePolygon) %>%
sf::st_set_crs(sf::st_crs(MainTrails)) # set a crs


Harvestable <- sf::st_as_sf(
dplyr::filter(NewInventory, LoggingStatus == "harvestable"),
coords = c("Xutm", "Yutm")) %>%
st_set_crs(st_crs(MainTrails))

HarvestableUp <- sf::st_as_sf(
dplyr::filter(NewInventory, LoggingStatus == "harvestableUp"),
coords = c("Xutm", "Yutm")) %>%
st_set_crs(st_crs(MainTrails))

Selected <- sf::st_as_sf(
dplyr::filter(NewInventory, Selected == "1"), coords = c("Xutm", "Yutm")) %>%
st_set_crs(st_crs(MainTrails))

Reserve <- sf::st_as_sf(
dplyr::filter(NewInventory, LoggingStatus == "reserve"),
coords = c("Xutm", "Yutm")) %>%
st_set_crs(st_crs(MainTrails))

Future <- sf::st_as_sf(
dplyr::filter(NewInventory, LoggingStatus == "future"),
coords = c("Xutm", "Yutm")) %>%
st_set_crs(st_crs(MainTrails))

ProbedHollow <- sf::st_as_sf(
dplyr::filter(NewInventory, ProbedHollow == "1"),
coords = c("Xutm", "Yutm")) %>%
st_set_crs(st_crs(MainTrails))

VisibleDefect <- sf::st_as_sf(
dplyr::filter(NewInventory, VisibleDefect == "1"),
coords = c("Xutm", "Yutm")) %>%
st_set_crs(st_crs(MainTrails))


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 adjusted for fuel wood") +

  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") +

    geom_sf(data = NewInventory_crs, # cuted trees
    alpha = 0.5, fill = "red") +

  # 2ndary trails
    geom_sf(data = st_as_sf(SecondaryTrails$SmoothedTrails),
    aes(color = "Initial-trails"),alpha = 0.5) +
    geom_sf(data = st_as_sf(SecondaryTrails$RawSecondTrails),
    color = "green",alpha = 0.5) +

  # 2ndary trails adjusted
    geom_sf(data = st_as_sf(ScdTrailsAdj$SmoothedTrails),
    aes(color = "Adjusted-trails"),alpha = 0.5) +
    geom_sf(data = st_as_sf(ScdTrailsAdj$RawSecondTrails),
    color = "red",alpha = 0.5) +

    scale_colour_manual(values = c("Visible defect" = "pink",
    "Harvestable" = "skyblue",
  "HarvestableUp" = "blue", "Selected" = "red", "Future" = "orange",
  "Reserve" = "purple", "Probed hollow" = "forestgreen",
   "Harvestable area" = "olivedrab", "Initial-trails" = "darkgreen" ,
   "Adjusted-trails" = "darkred"))

ScdTrailsAdj$TrailsIdentity
} # }