This is the first function to run when using the ProcessSpace package. It generates a TransectObject object that is the passed to additional functions to add additional details like cross section elevations and to generate spatial exports.

generateCrossSections(
  streamChannel,
  getSatImage = TRUE,
  googleZoom = 14,
  cut1Dir = "W",
  cut2Dir = "E",
  xSectionLength = units::as_units(100, "m"),
  xSectionDensity = units::as_units(100, "m"),
  provider = "Esri.WorldImagery"
)

Arguments

streamChannel

The target stream reach. This should be a single contiguous streamline. No forking or gaps.

getSatImage

Logical (TRUE). This determines whether to download satellite imagery (Esri World Imagery tiles via the maptiles package; no API key required). If the download fails (e.g. offline), the pipeline continues without a basemap.

googleZoom

Tile zoom level of satellite imagery. 15-17 typically work. (Named for backward compatibility with the old Google Maps basemap.)

cut1Dir

Important! Set this to the cardinal direction ("W","N","E","S") of the upstream end of the target streamline.

cut2Dir

Depreciated. No longer used.

xSectionLength

Length of cross sections away from the channel. Consider using units::as_units(100,"m") format.

xSectionDensity

Gap space between cross sections.Consider using units::as_units(20,"m") format.

provider

Tile provider passed to maptiles::get_tiles.

Value

transectObject. This object will be passed onto additional function in `ProcessSpace`. Initially it is returned with just, streamline, boundary of transects, transect lines, a bounding box, the retrieved satellite basemap (a terra SpatRaster, or NULL if unavailable), and the points where the cross sections cross the streamline.