Skip to content
Snippets Groups Projects
Commit 0436f795 authored by Bock, Andy's avatar Bock, Andy
Browse files

Added variable names for structural POIs/segments

parent 94b020ba
No related branches found
No related tags found
1 merge request!32Cleanup / improved POI_Collapse
......@@ -18,6 +18,8 @@ conf_pois <- paste0("Conf_", hydReg) # Confluence POIs
pois_all <- paste0("POIs_", hydReg) # All POIs binded together
nsegment_raw <- paste0("nsegment_raw_", hydReg) # Minimally-sufficient network attributed with POI_ID
n_segments <- paste0("Nsegment_", hydReg) # Minimally-sufficient network dissolved by POI_ID
structPOIs <- paste0("structPOIs_", hydReg)
strucNet <- paste0("structNet", hydReg)
#
NetworkNav <- function(inCom, nhdDF, withTrib){
......@@ -512,9 +514,8 @@ structPOIsNet <- function(ncombined, nhd, finalPOIs, out_gpkg){
finalNet <- unique(unlist(lapply(unique(finalStruct$COMID), NetworkNav, st_drop_geometry(nhd), "up")))
# Subset NHDPlusV2 flowlines to navigation results and write to shapefile
StructNet <- nhd %>% filter(COMID %in% finalNet & grepl(paste0("^", hydReg, ".*"), .data$VPUID))
structNet <- nhd %>% filter(COMID %in% finalNet & grepl(paste0("^", hydReg, ".*"), .data$VPUID))
# Write out minimally-sufficient network
write_sf(structPOIs, out_gpkg, "struct_POIs")
write_sf(StructNet, out_gpkg, "struct_Net")
# Write out minimally-sufficient network and POIs as a list
return(list(StrucPOIs = strucPOIs, StructNet = structNet))
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment