Skip to contents

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") DEPRECATED VERSION, use extend_transects_to_polygons() WIP/internal function for extending transect lines out to FEMA 100 year flood plain polygons (VERSION 2)

Usage

extend_transects_to_polygons2(
  transect_lines,
  polygons,
  flowlines,
  crosswalk_id = "hy_id",
  grouping_id = "mainstem",
  max_extension_distance = 3000
)

Arguments

transect_lines

Set of Sf linestrigns to extend (only if the transect lines are ENTIRELLY within a polygons)

polygons

set of sf polygons that transect lines should be exteneded

flowlines

set of Sf linestrings

crosswalk_id

character, flowline ID that matches flowlines with transect lines. This crosswalk_id must appear are a column in both flowlines and transect_lines.

grouping_id

character, name of a column in flowlines that should be used to group each transect with 1 or more flowlines. That is, when transects are checked to make sure they don't intersect other transects or other flowlines, this group ID will distinguise which flowlines a transect should be checked against. The intersect_group_id must appear as a column in both flowlines and transect_lines dataframes

max_extension_distance

numeric, maximum distance (meters) to extend a transect line in either direction to try and intersect one of the "polygons". Default is 3000m

Value

sf linestring, with extended transect lines