Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating cross_section_pts() function to remove and reevaluate "flat" Z value cross sections #5

Merged
merged 71 commits into from
Jul 30, 2024

Conversation

anguswg-ucsb
Copy link
Collaborator

  • updated cross_section_pts() function to check for any cross sections with Z values that are all the same across a cross section and thus give a "flat" cross section
  • new code will check for flat cross sections, then try to extend the given cross section, re extract new Z values from a DEM and check again for "flat" Z cross sections
  • Also added DS_store to ``.gitignore`
  • new output from cross_section_pts() has a is_extended flag that indicates if the original transect line was extended to find relevant Z values (is_extended = TRUE)

…s(), that cross network flowlines more than 1 time
…ted a function for extending linestring geometries from both ends by a certain percent of the original linestring geometries length
…ctions to modularize the code and make a check for any cross sections with flat Z values and makes an attempt to extend those cross sections and re extract Z values
…to new code and making a secondary v1 version of the function which is the old version of the code
…tion_pts() only remove flat cross sections, i.e. cross sections with all identical Z values
… original DEM values along the cross section lines, and the second rectify_flat_cs() function that will update or remove cross sections with flat cross sections (cross sections with all the same Z values)
…heck when seeing whether to extend a cross section or not
… change the geometry column to geom, at the end of rectify_cs_pts()
…or plotting cross section point Z values, and updated classify_pts() function to use cs_lengthm column instead of cs_widths column and added a point_type column that replicates the class column to eventually replace class column in future
…a given set of cross section points, WIP on applying this within rectify_flat_cs() function
…ectify_flat_cs() function with new version and temporarily keeping old version under the name rectify_flat_cs_v1(), will be deleted in future
…sines angles from a specified point within a set of cs points, bug fix on get_point_type_counts() that was double counting point types when a point type was missing from a cross section
…proving extracted cross section pts, created utils.R for general utility functions, added functions for adding bank validity and relief attributes to classified cross section pts, added bank and relief attributes to the output of the classify_points() function
…rnings when building pkg, bumped version, added a dontrun on move_geometry_to_last() roxygen example decorator
…ged function use point_type instead of class col
… error if there is valid_banks or has_relief values of NA, instead these transects get set aside and added back to the output
…as into cross section DEM points, bumped version
…n boundaries (used for FEMA floodplain extensions)
… made it use st_length() after the extensions to recalc length
… memory issues and forced more simplification, changed calls to is_valid_transect() to use just the current hy_id and flowline instead of entire network
…polygons() and also added a removal of self intersections after extending the transects
…performs intersects check on each new_line, big performance boost from this
@mikejohnson51 mikejohnson51 merged commit 5fdc7cd into lynker-spatial:main Jul 30, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants