clean_geometry: Clean Catchment Geometry

View source: R/catchment_geometry.R

clean_geometryR Documentation

Clean Catchment Geometry

Description

Fixes geometry issues present in catchments that originate in the CatchmentSP layers, or from the reconcile_catchments hyRefactor preocess. These include, but are not limited to disjoint polygon fragments, artifacts from the 30m DEM used to generate the catchments, and non-valid geometry topolgies. A goal of this functions is also to provide means to reduce the data column of the catchments by offering a topology preserving simplification through ms_simplify. Generally a "keep" parameter of .9 seems appropriate for the resolution of the data but can be modified in function

Usage

clean_geometry(catchments, ID = "ID", keep = 0.9, crs = 5070, sys = NULL)

Arguments

catchments

catchments geometries to fix

ID

name of uniquely identifying column

keep

proportion of points to retain in geometry simplification (0-1; default 0.05). See ms_simplify. If NULL, then no simplification will be executed.

crs

integer or object compatible with sf::st_crs coordinate reference. Should be a projection that supports area-calculations.

sys

logical should the mapshaper system library be used. If NULL the system library will be used if available.

Value

sf object


dblodgett-usgs/hyRefactor documentation built on Aug. 25, 2023, 9:09 p.m.