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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
dc20622
initial commit
anguswg-ucsb Nov 17, 2023
354eb51
changed 'll' variable name in cut_cross_sections to 'transects' for r…
anguswg-ucsb Nov 17, 2023
8de5dc4
last commit ALSO added removal of transect lines in cut_cross_sectio…
anguswg-ucsb Nov 17, 2023
13595e1
breaking cross_section_pts() function into smaller functions and crea…
anguswg-ucsb Nov 18, 2023
3631406
finalizing new version of cross_section_pts function using helper fun…
anguswg-ucsb Nov 20, 2023
3cc3abb
updated new cross section pts function imports to include some dplyr …
anguswg-ucsb Nov 20, 2023
b7c16ad
rebuild package and add new documentation man Rd files
anguswg-ucsb Nov 20, 2023
aef4ed5
adding DS_store to gitignore and renaming cross section pts function …
anguswg-ucsb Nov 20, 2023
f5bff23
rebuilt package with new version of cross section pts
anguswg-ucsb Nov 20, 2023
a7d3a7f
Merge pull request #1 from anguswg-ucsb/dev
anguswg-ucsb Nov 20, 2023
a3f8c14
started adding tests for cut_transects() and get_transects()
anguswg-ucsb Nov 21, 2023
c102f5d
cleanup commit
anguswg-ucsb Nov 22, 2023
aa1b61e
changed the threshold Z value from 1 meter to 0 which makes cross_sec…
anguswg-ucsb Nov 27, 2023
fc449f7
split cross_sections_pts() logic into 2 functions, one to extract the…
anguswg-ucsb Nov 29, 2023
a083161
added check to rectify_flat_cs()function to fix bug in intersection c…
anguswg-ucsb Nov 30, 2023
e575b60
cleaning up transects script
anguswg-ucsb Dec 3, 2023
b2515b5
added imports to new functions in R/transects.R, also added a line to…
anguswg-ucsb Jan 3, 2024
105649e
removed extraneous code from add_points_per_cs() function
anguswg-ucsb Jan 4, 2024
694a658
rebuild pkg
anguswg-ucsb Jan 4, 2024
eec91c1
added cs_visualization.R file containing a simple plotting function f…
anguswg-ucsb Jan 11, 2024
0b22ec7
rebuilt package to include visualization code and added ggplot2 as a …
anguswg-ucsb Jan 11, 2024
b9949a3
added function to determine the percent of points near the bottom of …
anguswg-ucsb Jan 28, 2024
28f8570
added new functions used in the new version of rectify_flat_cs2(), st…
anguswg-ucsb Feb 7, 2024
d59ab37
flipped cs_pts argument on rectify flat_cs()
anguswg-ucsb Feb 9, 2024
73b9fe2
updated version, renamed and reorganized R/transect.R, replaced old r…
anguswg-ucsb Feb 12, 2024
c8a38db
added a function for generating a count of point types for classified…
anguswg-ucsb Feb 12, 2024
41819d6
added cs_eval script that contains functions for generating law of co…
anguswg-ucsb Feb 29, 2024
0fe19ca
created a cs_rectify.R file for any code related to rectifying and im…
anguswg-ucsb Mar 5, 2024
0592fb7
added utils::globalVariables() function calls to remove some notes/wa…
anguswg-ucsb Mar 5, 2024
72ad4a5
fixed relief and bank functions to make sure they drop sf geometries …
anguswg-ucsb Mar 5, 2024
39fdf80
updated version of rectify function calle rectify_cs() which usees th…
anguswg-ucsb Mar 6, 2024
4884e54
added finalized changes to rectify_cs and added a rectify_summary() f…
anguswg-ucsb Mar 6, 2024
ef31f0f
added code to make sure classify_points() keeps and returns any extra…
anguswg-ucsb Mar 6, 2024
c3c088a
small bug fix on classify_points()
anguswg-ucsb Mar 6, 2024
9371f24
added cut_cross_section tests, explicitly declared the column names r…
anguswg-ucsb Mar 11, 2024
e17b5c2
added a validation function for the inputs of cut cross sections and …
anguswg-ucsb Mar 11, 2024
d13434f
fixed validate cut cross section inputs function to NOT accept NULL i…
anguswg-ucsb Mar 11, 2024
2c92748
updated cut_cross_sections() validation function and added more test …
anguswg-ucsb Mar 18, 2024
516d9f6
added add poiints per cs tests and changed cs_widths column to be cs_…
anguswg-ucsb Mar 20, 2024
dd898a5
created a new rectifiy cross secctions function which does the improv…
anguswg-ucsb Mar 26, 2024
ba28f3a
moved cross section points functions to new cs_pts.R file, created a …
anguswg-ucsb Mar 28, 2024
51c6e6e
troubleshooting cs_inchannel_estimate bug that is breaking install vi…
anguswg-ucsb Mar 28, 2024
7126f08
removed cs_inchannel estimate for time being
anguswg-ucsb Mar 28, 2024
4b84cc6
fixed select error in classify_points(), bumped version
anguswg-ucsb Mar 28, 2024
71bd9d3
added return statement to align_banks_and_bottoms() function and chan…
anguswg-ucsb Mar 29, 2024
cc176d1
removed check at beginning of extend_invalid_transects that throws an…
anguswg-ucsb Apr 1, 2024
f7f7251
added code for generating AHG parabolas and inserting AHG shapes into…
anguswg-ucsb Apr 4, 2024
95d970b
added AHGestimation functionality for inserting AHG estimated parabol…
anguswg-ucsb Apr 8, 2024
645427e
migrating fema functions from hydrofabric to hydrofabric3D
anguswg-ucsb May 29, 2024
2808a42
added calc extenstion distances for getting the distances to extend t…
anguswg-ucsb May 29, 2024
402b4bb
added function for extending a set of transects out to a given polyg…
anguswg-ucsb Jun 4, 2024
59cf688
repackaged and bumped version
anguswg-ucsb Jun 5, 2024
17ee475
removed messages from calc_extension_distance in fema_utils
anguswg-ucsb Jun 24, 2024
fc18558
added temporary messages for calc_extension_distance and fixed typo i…
anguswg-ucsb Jun 24, 2024
40ea69a
removed scale variable from extend_transects_by_length() function and…
anguswg-ucsb Jun 25, 2024
12b48f0
removed simplification in extend transects to polygon bounds
anguswg-ucsb Jun 25, 2024
6cf0ffe
updated function for extending transects out to polygon bounds, fixed…
anguswg-ucsb Jun 26, 2024
d23e055
changed is_valid_transect_line calls to use ALL transects again...
anguswg-ucsb Jun 26, 2024
ecab500
changed validation to check whole network against new transect
anguswg-ucsb Jun 27, 2024
c04a047
added an optional intersect_group_id argument to extend_transects_to_…
anguswg-ucsb Jun 27, 2024
a088aeb
removed is_extended select()
anguswg-ucsb Jun 27, 2024
5b6b30b
fixed bug in how geos geometries are handled in ifelse(), weird
anguswg-ucsb Jun 27, 2024
7c6b841
fixed issue with different length vectors after removing self interse…
anguswg-ucsb Jun 27, 2024
ef74e6a
small cleansup
anguswg-ucsb Jul 3, 2024
c45f28b
reworked extend_transects_to_polygons with a crosswalk_id argument, r…
anguswg-ucsb Jul 8, 2024
38d337e
bumped version, small cleanups, and change in how geos_bs_distance() …
anguswg-ucsb Jul 26, 2024
986498e
testing out new calculation extension distance function
anguswg-ucsb Jul 26, 2024
f60894b
refactoring transect to polygon extender
anguswg-ucsb Jul 29, 2024
ed0e970
bumped version and added pick_extension_pts function and docs
anguswg-ucsb Jul 29, 2024
92e8178
added imports to get_extensions_by_id and a temporary debug statement
anguswg-ucsb Jul 30, 2024
a1c3224
forced geometry column name instead of geom
anguswg-ucsb Jul 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
14 changes: 14 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,17 @@ workspace
^docs$
^pkgdown$
^vignettes/articles$
^\\runners$
^runners/.*$

^hydrofabric3D\.Rproj$
^\.github$
^\\.urs_cookies$
^\\.dodsrc$
^[.].*$
^.*/[.].*$
^general_visuals\.R$
^scraps\.R$
^scraps2\.R$
^scraps3\.R$

19 changes: 18 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,21 @@
.Rhistory
.RData
.Ruserdata
R/scraps.R

.DS_Store
*.DS_Store
**/.DS_Store

.urs_cookies
*.urs_cookies
**/.urs_cookies

R/scraps.R

runners/cs_runner/
tmp_plots.R

scraps.R
scraps2.R
scraps3.R
general_visuals.R
16 changes: 12 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: hydrofabric3D
Title: hydrofabric3D
Version: 0.0.1
Version: 0.0.96
Authors@R: c(person("Mike", "Johnson", role = c("aut", "cre"), email = "[email protected]"),
person("Angus", "Watters", role = "aut"),
person("Arash", "Modaresi", role = "ctb"),
Expand All @@ -16,19 +16,27 @@ Imports:
wk,
terra,
dplyr,
terra,
tidyr,
vctrs,
sf,
smoothr,
zoo,
nhdplusTools,
fastmap
fastmap,
ggplot2,
rlang,
lwgeom,
rmapshaper,
AHGestimation
Remotes:
mikejohnson51/AHGestimation
Depends:
R (>= 2.10)
LazyData: true
Config/Needs/website: rmarkdown
Suggests:
knitr,
rmarkdown
rmarkdown,
testthat (>= 3.0.0)
VignetteBuilder: knitr
Config/testthat/edition: 3
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 hydrofabric3D authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
66 changes: 66 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,36 +1,83 @@
# Generated by roxygen2: do not edit by hand

export(add_angle_at_point_type)
export(add_cs_bathymetry)
export(add_middle_index_by_point_type)
export(add_point_type_counts)
export(add_relief)
export(add_tmp_id)
export(align_banks_and_bottoms)
export(angle_at_index)
export(classify_points)
export(cross_section_pts)
export(cross_section_pts_v2)
export(cross_section_pts_v3)
export(cut_cross_sections)
export(cut_transect)
export(extend_invalid_transects)
export(extend_transects)
export(extend_transects_by_distances)
export(extend_transects_by_length)
export(extend_transects_to_polygons)
export(extend_transects_to_polygons2)
export(fill_missing_ahg_coords)
export(find_braids)
export(find_connected_components)
export(fix_braid_transects)
export(geos_extend_line)
export(get_braid_list)
export(get_coords_around_parabola)
export(get_cs_bottom_length)
export(get_extensions_by_id)
export(get_point_type_counts)
export(get_relief)
export(get_transect_extension_distances_to_polygons)
export(get_transects)
export(get_unique_tmp_ids)
export(improve_invalid_cs)
export(is_braided)
export(make_progress_bar)
export(pct_pts_near_bottom)
export(pick_extension_pts)
export(plot_cs_pts)
export(pts_to_reevaluate)
export(rectify_cs)
export(rectify_flat_cs)
export(rectify_summary)
export(subset_polygons_in_transects)
export(subset_transects_in_polygons)
export(unique_braids)
export(unnpack_braids)
importFrom(AHGestimation,cross_section)
importFrom(dplyr,`%>%`)
importFrom(dplyr,add_count)
importFrom(dplyr,all_of)
importFrom(dplyr,any_of)
importFrom(dplyr,arrange)
importFrom(dplyr,between)
importFrom(dplyr,bind_rows)
importFrom(dplyr,case_when)
importFrom(dplyr,count)
importFrom(dplyr,ends_with)
importFrom(dplyr,everything)
importFrom(dplyr,filter)
importFrom(dplyr,group_by)
importFrom(dplyr,lag)
importFrom(dplyr,last_col)
importFrom(dplyr,lead)
importFrom(dplyr,left_join)
importFrom(dplyr,mutate)
importFrom(dplyr,n)
importFrom(dplyr,n_distinct)
importFrom(dplyr,relocate)
importFrom(dplyr,rename)
importFrom(dplyr,rowwise)
importFrom(dplyr,select)
importFrom(dplyr,slice)
importFrom(dplyr,slice_max)
importFrom(dplyr,summarise)
importFrom(dplyr,summarize)
importFrom(dplyr,sym)
importFrom(dplyr,tibble)
importFrom(dplyr,ungroup)
importFrom(fastmap,fastmap)
Expand All @@ -42,19 +89,32 @@ importFrom(geos,geos_interpolate_normalized)
importFrom(geos,geos_intersection)
importFrom(geos,geos_intersects)
importFrom(geos,geos_intersects_any)
importFrom(geos,geos_intersects_matrix)
importFrom(geos,geos_is_empty)
importFrom(geos,geos_length)
importFrom(geos,geos_make_linestring)
importFrom(geos,geos_point_end)
importFrom(geos,geos_point_start)
importFrom(geos,geos_simplify_preserve_topology)
importFrom(geos,geos_type)
importFrom(geos,geos_within_matrix)
importFrom(geos,geos_x)
importFrom(geos,geos_y)
importFrom(ggplot2,aes)
importFrom(ggplot2,facet_grid)
importFrom(ggplot2,facet_wrap)
importFrom(ggplot2,geom_point)
importFrom(ggplot2,ggplot)
importFrom(lwgeom,st_linesubstring)
importFrom(nhdplusTools,get_UT)
importFrom(nhdplusTools,get_node)
importFrom(nhdplusTools,get_sorted)
importFrom(nhdplusTools,get_tocomid)
importFrom(nhdplusTools,make_node_topology)
importFrom(nhdplusTools,rename_geometry)
importFrom(rlang,as_name)
importFrom(rlang,enquo)
importFrom(rmapshaper,ms_simplify)
importFrom(sf,st_as_sf)
importFrom(sf,st_cast)
importFrom(sf,st_centroid)
Expand All @@ -65,10 +125,12 @@ importFrom(sf,st_geometry)
importFrom(sf,st_intersects)
importFrom(sf,st_length)
importFrom(sf,st_line_sample)
importFrom(sf,st_segmentize)
importFrom(sf,st_set_geometry)
importFrom(sf,st_transform)
importFrom(smoothr,densify)
importFrom(smoothr,smooth)
importFrom(stats,median)
importFrom(stats,setNames)
importFrom(terra,crs)
importFrom(terra,extract)
Expand All @@ -77,7 +139,11 @@ importFrom(terra,project)
importFrom(terra,rast)
importFrom(terra,res)
importFrom(terra,vect)
importFrom(tidyr,pivot_longer)
importFrom(tidyr,pivot_wider)
importFrom(tidyr,unnest)
importFrom(utils,str)
importFrom(utils,txtProgressBar)
importFrom(vctrs,vec_c)
importFrom(wk,wk_affine_compose)
importFrom(wk,wk_affine_rotate)
Expand Down
Loading
Loading