Samples one downstream-to-upstream Flowline at no more than the requested spacing, assigns route measures and extracts DEM elevations.
flowline_points(
flowline,
dem,
station_distance,
measure_offset = 0,
measure_units = c("m", "km")
)sf object; A flowline object.
terra SpatRaster object; A single-layer DEM in the Flowline CRS.
numeric; Maximum distance between Flowline points, in metres. Existing vertices are retained.
numeric; Measure assigned to the downstream endpoint, in `measure_units`. Defaults to zero.
character; `"m"` preserves the established R API and current clients. `"km"` produces the legacy ArcPy replacement measure profile.
An `sf` point object with `ID`, `ReachName`, `POINT_X`, `POINT_Y`, `POINT_M` in `measure_units`, `km_to_mouth` in kilometres and sampled `Z`.
This retains the established `fluvgeo` behavior of preserving all existing vertices and densifying only segments longer than `station_distance`. The input CRS is retained. The default metre profile and zero origin preserve existing `ohwm2` behavior. FG Studio's ArcPy- replacement chain requests `measure_units = "km"` explicitly.