Skip to contents

Calculate the points per cross section based off length relative to a DEM Given the length of cross sections and a DEM, approximate the appropriate number of points for each cross section length

Usage

dem_based_points_per_cs(
  cs_length,
  dem =
    "/vsicurl/https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/TIFF/USGS_Seamless_DEM_13.vrt"
)

Arguments

cs_length

numeric vector, lengths of each cross section (meters)

dem

A SpatRaster object representing the Digital Elevation Model (DEM) or a character string referencing a remote resource. the function calculates it based on the length of cross-sections and the resolution of the DEM.

Value

numeric vector of length cs_length, with the number of points per cs_length