Package: hydrofab 0.6.1

Mike Johnson

hydrofab: Hydrologic Network Refactoring and Aggregation Tools

A collection of tools for manipulating hydrologic and hydraulic networks

Authors:Mike Johnson [aut, cre], David Blodgett [ctb]

hydrofab_0.6.1.tar.gz
hydrofab_0.6.zip(r-4.5)hydrofab_0.6.zip(r-4.4)hydrofab_0.6.zip(r-4.3)
hydrofab_0.6.tgz(r-4.4-any)hydrofab_0.6.tgz(r-4.3-any)
hydrofab_0.6.tar.gz(r-4.5-noble)hydrofab_0.6.1.tar.gz(r-4.4-noble)
hydrofab_0.6.1.tgz(r-4.4-emscripten)hydrofab_0.6.1.tgz(r-4.3-emscripten)
hydrofab.pdf |hydrofab.html
hydrofab/json (API)

# Install 'hydrofab' in R:
install.packages('hydrofab', repos = c('https://owp-spatial.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/noaa-owp/hydrofab/issues

Datasets:

On CRAN:

3.48 score 1 stars 3 scripts 65 exports 94 dependencies

Last updated 20 days agofrom:9c2c1d8bcd. Checks:OK: 1 ERROR: 6. Indexed: no.

TargetResultDate
Doc / VignettesOKDec 06 2024
R-4.5-winERRORDec 06 2024
R-4.5-linuxERRORDec 06 2024
R-4.4-winERRORDec 06 2024
R-4.4-macERRORDec 06 2024
R-4.3-winERRORDec 06 2024
R-4.3-macERRORDec 06 2024

Exports:add_areasqkmadd_areasqkm_to_crosswalkadd_flowpath_edge_listadd_hydroseqadd_lengthkmadd_lengthmapadd_lookup_tableadd_mapped_hydrolocationsadd_measuresadd_nonnetwork_dividesadd_nonnetwork_nexus_locationadd_prefixagg_length_areaaggregate_along_mainstemsaggregate_network_to_outletsaggregate_setsaggregate_to_distributionaggregate_to_outletsappend_styleapply_nexus_topologyassign_global_identifiersassign_idbuild_collapse_tablebuild_new_id_tableclean_geometrycollapse_flowlinescs_groupdefine_touch_iddescribe_hydrofabricdownload_elevdownload_fdr_facdrop_extra_featuresflowpaths_to_linestringsflush_prefixget_boundariesget_minimal_networkhl_to_outlethyaggregate_loglayer_existsmake_hf_gpkg_from_refactormake_hf_gpkg_from_referencemake_hf_gpkg_from_uniform_aggregatemap_outlet_idsmiddle_massagenetwork_metadatapack_setpinch_sidesprep_split_eventsprepare_networkread_hydrofabricrealign_topologyreconcile_catchment_dividesreconcile_collapsed_flowlinesrefactorrefactor_nhdplussb_idsplit_catchment_dividesplit_flowlinesst_renameunion_linestringsunion_linestrings_geosunion_polygonsunpack_setupdate_network_identifierswrite_hydrofabric

Dependencies:arrowaskpassassertthatbitbit64cachemclassclassIntclicliprcpp11crayoncurldata.tabledataRetrievalDBIdigestdplyre1071fansifastmapfstfstcoregenericsgeojsonsfgeometriesgluehmshttrhydroloomigraphjsonifyjsonliteKernSmoothlatticelifecycleloggerlubridatelwgeommagrittrmaplegendmapsfmaptilesMASSMatrixmemoisemimenhdplusToolsopensslpbapplypillarpkgconfigpngprettyunitsprogressproxypurrrR.methodsS3R.ooR.utilsR6RANNrapidjsonrrasterRcppreadrrlangrmapshaperrvests2selectrsfsfheadersslippymathspstringistringrsysterratibbletidyrtidyselecttimechangetzdbunitsutf8V8vctrsvroomwithrwkxml2yyjsonrzip

Readme and manuals

Help Manual

Help pageTopics
Compute km2 area Short hand for safely computing area in sqkm and returning as numeric vector.add_areasqkm
Add small area to crosswalkadd_areasqkm_to_crosswalk
Generate Catchment Network Tableadd_flowpath_edge_list
Add hydrosequenceadd_hydroseq
Compute length in kilometersadd_lengthkm
Add Length Map to Refactored Networkadd_lengthmap
Generate Lookup table for refactored or aggregated networkadd_lookup_table
Add a mapped_POI layer to network_listadd_mapped_hydrolocations
Add/sync/update length and area measuresadd_measures
Add Non Network Divides to Aggregated Fabric The refactoring process intentionally drop catchments without a flowpath. In cases where a seamless discritization of the landscape is needed, these area must be reintroduced from the reference dataset.add_nonnetwork_divides
Add Non-Network Nexus Locationsadd_nonnetwork_nexus_location
Add Prefixes to Topological Dataadd_prefix
Enforces area and length groupingagg_length_area
Aggregate along network mainstemsaggregate_along_mainstems
Aggregate Networkaggregate_network_to_outlets
Aggregate Sets by Index Tableaggregate_sets
Aggregate Network to Uniform Sizeaggregate_to_distribution
Aggregate Catchmentsaggregate_to_outlets
Append a hydrofabric style to a hydrofabric GeoPackageappend_style
Update Hydrofabric Identifiers For a given set of hydrofabric geopackages, update the ID and toID values to be globally unique.assign_global_identifiers
Index a Vector by Cumulative Sumassign_id
Build Headwater Collapse Tablebuild_collapse_table
Build a new ID tablebuild_new_id_table
Clean Catchment Geometryclean_geometry
Collapse NHDPlus Networkcollapse_flowlines
Collapse Headwaterscollapse_headwaters
Cumulative sum area groupingcs_group
Identify intersection types and downstream topologydefine_touch_id
Describe Hydrofabric Describes a hydrofabric in terms of flowpath and catchment count. If they are unequal, FALSE is returned. If equal TRUE is returned. Messages can optionally be emitted.describe_hydrofabric
Download Elevation and Derivativesdownload_elev
Download FDR FACdownload_fdr_fac
Remove non-coincident Network Features Remove non-coincident flowlines and catchment pairs from a network listdrop_extra_features
Convert MULITLINESTINGS to LINESTRINGSflowpaths_to_linestrings
Flush existing ID prefixes Given a data object and column, remove a prefix and adjoining "-"flush_prefix
Return RPU or VPU boundariesget_boundaries
Get Minimal Networkget_minimal_network
Get Row and Columnget_row_col
Extract nexus locations for Reference POIshl_to_outlet
Check if a geopackage and layer exists This function checks if a layer exists in a geopackagelayer_exists
Convert Refactor Output to HF gpkg This is a temporary function as changes get pushed upstreammake_hf_gpkg_from_refactor
Convert Reference Output to HF gpkg This is a temporary function as changes get pushed upstreammake_hf_gpkg_from_reference
Convert Target Size Aggregate output to HF gpkg This is a temporary function as changes get pushed upstreammake_hf_gpkg_from_uniform_aggregate
Map outlets from COMID to ID for aggregate catchmentsmap_outlet_ids
Re-index the interior of vector by thresholdmiddle_massage
Capture Network Metadata This function assumes that files are names *_VPU.gpkgnetwork_metadata
pack setpack_set
Re-index the edges of vector by threshold Merge the outside edges of a vector if they are less then the provides threshold.pinch_sides
Prep catchment with FDR/FACprep_cat_fdr_fac
Prep Split Eventsprep_split_events
Prepare Hydrologic Networkprepare_network
Read Catchments and Flowpaths from Geopackage Convenience function for reading two layers into a listread_hydrofabric
Reconcile Catchment Dividesreconcile_catchment_divides
Reconcile Collapsed Flowlinesreconcile_collapsed_flowlines
Refactoring Wrapperrefactor
Refactor NHDPlusrefactor_nhdplus
RPU Boundaries Raster Processing Unit boundariesrpu_boundaries
Return ScienceBase ID for hydrofabric This function checks if a layer exists in a geopackagesb_id
Split Catchment Dividessplit_catchment_divide
Split Flowlinessplit_flowlines
Rename simple features layerst_rename
Trace Upstreamtrace_upstream
DEPRECATED: Fast LINESTRING unionunion_linestrings
DEPRECATED: Fast LINESTRING unionunion_linestrings_geos
Fast POLYGON Unionunion_polygons
unpack setunpack_set
Update Network Identifiers Given a data.frame of sf object, the id and toid values are undated based on a provided lookup table (produced with build_new_id_table), and a vpu_topo list if there are cross VPU flows. In the vpu_topo is NULL or has 0 rows, no vpu correction is applied.update_network_identifiers
VPU Boundaries Vector Processing Unit boundariesvpu_boundaries
Write a hydrofabric gpkg A hydrofabric consists of a flowpath, catchment, and topology layer written to a self contained geopackagewrite_hydrofabric