Skip to content

Conversation

taddyb
Copy link

@taddyb taddyb commented Mar 20, 2025

Summary:

Replace and Route runs on segments from the NHD RouteLink for routing NWPS forecasts downstream. These segments are generated using a domain generator built into the NOAA-OWP/Hydrovis Domain generator. Given NOAA's switch to the v2.2 Hydrofabric, we have created a new function to generate a subset of the Hydrofabric between two NHD COMIDs to best address this need

image

See here for production segment data

Capability:

Create an instance of the subsetting tool, hfsubsetR, with a functional endpoint and the functional endpoint and the functionality needed to complete associated deliverables.

What was added:

  • R/get_shortest_path.R to create segments between two NHD comids
    • This only works with COMIDs since that is how RFC geolocations are defined from the NWPS API
  • Updated NAMESPACE, DESCRIPTION, and .Rd docs

Example: Here is a shortest path (green) and the end of a subset (red/orange) with the v2.2 Hydrofabric
image

taddyb and others added 2 commits March 12, 2025 15:02
* Create get_shortestpath.R

Created shortest path

* Working code for shortest path

* Update get_shortestpath.R

* reformatted get_shortest_path to output more layers and fit with existing code

* adding compliation changes

---------

Co-authored-by: CalebNovinger <caleb.d.novinger@rtx.com>
@mikejohnson51
Copy link
Member

I would support integrating this but do not want to drag tidygraph around. If we can do this with hydroloom/igraph it would be excellent! Do you want to look into that or should I?

@taddyb
Copy link
Author

taddyb commented Apr 18, 2025

I can take at stab at switching the dependency on our end and push an update. I noticed the test coverage failed... makes me think 1-2 tests for the new function would be good to ensure this function has coverage with any code changes in the future. It will be my first time usingtestthat so, I'll try to keep things simple.

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