Skip to content

Batch splitting catchments: get_split_catchments(), get_raindrop_trace(), method ambiguity and errors #420

@mjcashman

Description

@mjcashman

I have a use-case where I need to split NHD catchments at around ~3,000 locations where I have USGS gages and biological sample data. In getting this workflow operational, I have encountered several issues and ambiguities that I'm documenting below:

According to the documentation in get_split_catchment(), it is recommended that I use get_raindrop_trace() prior to catchment splitting, as points not along a flowline (which may occur in my use-case due to poor GPS location data) may instead delineate a small sub-catchment off the flowline. While this is useful, ambiguity in its implementation is my first question.

  • When does the distance between the lat/long point and the flowline change between snapping to the flowline and delineating a flowline/catchment split, and delineating a catchment off the flowline occur? Surely there must be a tolerance under the hood that's performing the operation. This would be good to know. For example, I have the following two points: point <- tibble(lat =39.24767, lon= -76.71308) and alt_point <- tibble(lat =39.24949, lon= -76.71325) , less than 200 m apart, located at an office and across the street, both "off a flowline". However, they result in on-flowline and off-flowline split catchment delineations respectively, as seen below:

Image.
If I have points that switch arbitrarily between on and off flowpath delinations, that could be a problem, especially if its unclear when this happens, so I can't create a catch for that.

  • This naturally leads to using the get_raindrop_trace() function to force all locations to find the nearest flowline to help in the delineation. However, I have run into several common errors that occur when executing this function across a batch of sites.
  1. The first error type is: "Error executing process: Flowtrace intersected a nodata FDR value; cannot continue downhill.", which can be reproduced using USGS gage 07144780 NF NINNESCAH R AB CHENEY RE, KS (lat =37.86261, lon= -98.01385). However, when checking this site, the point is located next to the flowline, and this lat/long intersects with the flow direction grid contained in NHDPlus. Flow is going from left to right.:
    Image

  2. A second type of common error occurs with: "Error executing process: Input geometry segment overlaps with the splitter.", with a reproducible example at USGS gage 07315700 Mud Creek near Courtney, OK (lat = 34.00426, lon = -97.56697). I have not been able to dig as much into the characteristics of this error type, but still we're only doing the raindrop tracing, and not even doing splitting. If you skip the raindrop trace, it successfully splits the catchment along the flowline when using get_split_catchment(), since the point is also pretty close to the flowline.

Image

  1. A third type of error also occurs: "Error executing process: index out of range" with a reproducible example at USGS gage 03588500 SHOAL CREEK AT IRON CITY, TN (lat = 35.02412, -lon = 87.57903). This seems like it's on a tiny flowline fragment, but split catchment still does a delineation ( see below). Perhaps the flow direction takes the point outside of the source catchment before it intersects with the flowline?

Image

Before I write some error handlers that default back to the default catchment splitting whenever the raindrop trace fails, I really would like to understand how these functions are working more closely, why they're throwing errors, and if I might be missing alternative problems (and accidentally resulting in off-flowline splitting) if I implement this fallback measure.

Happy to discuss more

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions