lcp_rds_outfield: Connect anchor field to existing infrastructure

View source: R/simulate_inf.R

lcp_rds_outfieldR Documentation

Connect anchor field to existing infrastructure

Description

lcp_rds_outfield is a helper function that operates within generate_sat_rd to connect an anchor field (a central processing facility, or CPF, and its associated satellites, connected by infield roads created by lcp_rds_infield) to existing or previously simulated infrastructure.

Usage

lcp_rds_outfield(
  x,
  y = x,
  tmp.rd.sl,
  rd.df = NULL,
  rd.sl = NULL,
  tr,
  cost.map,
  min.dist.exist,
  exist.coords,
  road.res,
  rd.exist,
  alt.b.stranded.leases = NULL,
  tr.cost.alt.c.row = NULL,
  alt.d.TLnorth = NULL,
  wd.loc,
  path.out,
  scenario,
  n.iter,
  roadless.check,
  j,
  z = NULL,
  i = NULL,
  debug.out = FALSE
)

Arguments

x

data.frame of locations to be connected to existing infrastructure. For most scenarios this is the full anchor field dataset, tmp.rd.df, created by lcp_rds_infield, but if(roadless.check == 2) it might be a subset of this data.frame, designated as rd.0s.

y

data.frame of all anchor field road locations. This defaults to be the same as x, which is valid for most scenarios. However, if(roadless.check == 2) it can be specified as the full anchor field dataset, tmp.rd.df, created by lcp_rds_infield, allowing this to be passed along to the final dataset, even for roadless portions north of Teshekpuk Lake that are not connected to existing infrastructure.

tmp.rd.sl

SpatialLines object depicting anchor field roads. Created by lcp_rds_infield.

rd.df

data.frame of road coordinates. If this is the first iteration through generate_sat_rd (i.e., j == 1) then this will not exist and will be created by the code. Otherwise, the file previously created/updated by lcp_rds_outfield will be used.

rd.sl

SpatialLines object depicting road locations. If this is the first iteration through generate_sat_rd (i.e., j == 1) then this will not exist and will be created by the code. Otherwise, the file previously created/updated by lcp_rds_outfield will be used.

tr

Scenario-specific TransitionLayer object, used by the gdistance package for creating least cost paths.

cost.map

RasterLayer indicating land and water areas, used in gravel pad simulation. Created by prep_general_inputs.

min.dist.exist

Proximity order-sorted data.frame of distance from CPFs to existing infrastructure. Created within generate_sat_rd.

exist.coords

data.frame containing coordinates of existing infrastructure. Created by prep_general_inputs.

road.res

Scenario-specific road restriction RasterLayer. Created by prep_scenario_inputs.

rd.exist

SpatialLinesDataFrame object representing existing roads. Created by prep_general_inputs.

alt.b.stranded.leases

RasterLayer identifying stranded lease locations under Alternative B. Created by prep_scenario_inputs. Optional, as this is only needed when running Alternative B.

tr.cost.alt.c.row

TransitionLayer for right-of-way (ROW) areas under Alternative C, accounting for connecting roads that are allowed within some of the 50% Teshekpuk Caribou Herd (TCH) calving kernel under this alternative. Created by prep_scenario_inputs. Optional, as this is only needed when running Alternative C.

alt.d.TLnorth

RasterLayer identifying available areas for development north of Teshekpuk Lake under Alternative D. Created by prep_scenario_inputs. Optional, as this is only needed when running Alternative D.

wd.loc

Character string identifying the base directory containing both input and output data folders.

path.out

Character string identifying the relative path from the base directory (wd.loc) to where output data will be saved. Defaults to an "Output_Data" folder within the base folder.

scenario

Vector of character strings identifying the scenarios being run.

n.iter

Integer indicating the desired number of iterations to be run for each scenario. Defaults to 100.

roadless.check

Integer value providing a flag that indicates how roadless development should be dealt with. Created by generate_sat_rd.

j

Iterator used within generate_sat_rd to indicate the current CPF being analyzed.

z

Iterator value used by dia to specify the development scenario being analyzed.

i

Iterator value used by dia to run development simulation and impacts analyses in parallel, indicating the specific iteration being run.

debug.out

Logical indicator of whether intermediate infrastructure .csv files should be written out for the purpose of debugging code. Defaults to FALSE.

Value

List containing two objects, a data.frame of generated road coordinates (rd_df) and a SpatialLines object depicting generated roads (rd_sl).


tfullman/dia documentation built on Oct. 17, 2023, 6:31 p.m.