Checks that the input data structure `flowline_points` meets the requirements for this data structure.

check_flowline_points(
  flowline_points,
  contract = c("legacy_core", "fgstudio_replacement")
)

Arguments

flowline_points

sf object; a `flowline_points` data structure used by the fluvgeo package.

contract

character; `"legacy_core"` validates the historical common field contract without assuming measure units. `"fgstudio_replacement"` additionally requires kilometer `POINT_M`, `POINT_M_uncalibrated`, `calibration_diff`, and `km_to_mouth` relationships and unit declarations for the ArcPy-replacement chain.

Value

Returns TRUE if the `flowline_points` data structure matches the requirements. The function throws an error for a data structure not matching the data specification. Returns errors describing how the the data structure doesn't match the requirement.