Adds attributes about the banks of each cross section in a dataframe of cross section points Function adds "bottom", "left_bank", "right_bank" columns that are the Z values of the "lowest" bottom point, and the "highest" left and right bank Z values, respectively. If there are And also a "valid_banks" column is added that is TRUE if the hy_id/cs_id set of cross section point has at least 1 bottom point with at least 1 left bank point AND 1 right bank point that are above the lowest "bottom" point.
Find braids and add to a dataframe/sf dataframe Adds a 'braid_id' and 'is_multibraid' columns to an sf dataframe containing a crosswalk_id and sf linestring geometires
Add a unique 'hydrofabric_id` to each row of a dataframe Internal conveniance function for when a dataframe / flowlines network does NOT have a specified ID column
Add an is_complete_cs flag to cross sections points Any cross section points that has does NOT have ANY NA Z (depth) values is flagged as is_complete_cs = TRUE
Add an is_missing_depth flag to cross sections points Any cross section points that has missing Z (depth = NA) values is flagged as is_missing_depth = TRUE
Add relief attributes to a dataframe of cross sections points Given a set of cross section points (derived from hydrofabric3D::cross_section_pts() and hydrofabric3D::classify_points()) add a "has_relief" logical value to data. The "has_relief" value is indicating whether a cross section "has relief". Relief is determined by checking each set of cross section points have a left OR right bank that has a depth difference from the bottom that isgreater than or equal to a percentage of the cross section length (e.g. Assuming a 'pct_of_length_for_relief' of 0.01 (1%) of a 100m cross section would have a relief depth threshold of 1m)
Update a flagged set of transects by shortening them by the given left_distance and right_distance (adjust_flagged_transects() v2 ) Requires 'left_distance' and 'right_distance' columns to specify how much to adjust flagged transects by
Classify Cross Section Points (version 3) with NA removal Version 2 of cross section point classifier function, uses 1st and 2nd derivative of the depths to better classify channel points
Classify Cross Section Points (version 2) Version 2 of cross section point classifier function, uses 1st and 2nd derivative of the depths to better classify channel points
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
Given a set of transect lines, a flowline network, extend the transect lines out given distances from the left and right Flowlines are required to ensure valid transect intersection relationship is maintained
Give a set of transecct linestrings and poylgons and get the minimum distance to extend each transect line (from both directions, to try and reach the edge of a "polygons") Superseces old version of function (now named extend_transects_to_polygons2())
Get attributes about the banks of each cross section in a dataframe of cross section points Given a set of cross section points with point_type column, return a dataframe of the unique hy_id/cs_ids with the following calculated columns: "bottom", "left_bank", "right_bank" columns which are the Z values of the "lowest" bottom point, and the "highest" left and right bank Z values, respectively. And a "valid_banks" column indicating whether the hy_id/cs_id set of cross section point has at least a signle bottom point with at least 1 left bank point AND 1 right bank point that are above the lowest "bottom" point.
Get relief attributes from a dataframe of cross sections points Generate a dataframe from a set of classified cross section points indicating whether a cross section "has relief". Relief is determined by checking each set of cross section points have a left OR right bank that has a depth difference from the bottom that is greater than or equal to a percentage of the cross section length (e.g. Assuming a 'pct_of_length_for_relief' of 0.01 (1%) of a 100m cross section would have a relief depth threshold of 1m)
Detect whether a braid exists in a hydrologic network Check if if a hydrologic network dataset contains any braids. If multiple discontinuous networks are within the 'network' data. The function will try to infer the distinct networks and then check for braids in each component (using find_connected_components()).
Selectively removes intersecting transect lines Attempts to remove transects intersecting other transects by first removing transects that interesect the most other transects, then re checking intersection condition, and doing this until there are no multi intersections this gives the benefit of removing a transect line that intersects many other transects, potentially leaving those other transects with no extraneous intersections ONCE the MULTI intersecting transect is removed
Select standard cross section point columns Internal helper function for selecting cross section point columns aligning with standard data model for cross section points
Takes any transects that was extended and with multiple flowline intersections, and shortens them by the distance specified in the "extension_distance" column
Validate Classified Cross Sections Points Ensure all cross section points are valid. This validates the points in the same manner as validate_cs_pts() but also checks that classification columns ('class', 'point_type', 'valid_banks', 'has_relief') exist.
Validate Classified Cross Section Points Against Transects Ensure all cross section points are valid relative to a set of transects. This validates the points in the same manner as validate_cs_pts_against_transects() but also checks that classification columns ('class', 'point_type', 'valid_banks', 'has_relief') exist.