Examination of the observed occupancy points has shown that some of the
locations do not spatially align with the
NHDHRDV2 stream network. Sample
locations were found to fall into four classifications, involving three
versions of flowlines. The processing steps outlined in this repository snap
the locations to the stream network in ArcGIS. The snapping effort is
specifically in support of the
Network Analysis (Trout GRF) project,
but may serve as a template for similar work in the future.
Three flowlines versions are used in the snapping process:
- detailed - All inclusive high resolution flowlines
2. truncated - The high resolution flowlines trimmed to a 0.75 km2 drainage area threshold
3. dem - The flowlines generated by setting the 0.75 km2 threshold on the flow accumulation layer.
The "dem" flowlines are the threshold that is used to trim the "detailed"
flowlines and create the "truncated" flowlines. This layer includes all cells
that have 0.75 km2 drainage area or greater, not just those that
fall within the high resolution network. For practical purposes these can be
considered undocumented streams, meaning they are not included in the original
NHD high resolution data but could still exist. These streams were considered
because of case #2 below.
Fish sample sites fall into one of four classifications outline below:
- Detailed Network Only - The point is on the "detailed" network (red), but
not on the "truncated" network (green).

Figure 1: A site only on the detailed network
- Undocumented Stream - The point is on a "dem" network (blue), but not
located on the "detailed" network (red).

Figure 2: A site on an undocumented stream
- Outside Buffer - Points are not near any of the network versions. These are
accounted for by setting a snap distance.

Figure 3: A site outside of the maximum snapping distance
- Truncated Network - The points are on all of the network versions. These
points are the ones kept for use with stream network analysis.

Figure 4: A site usable with the stream network analysis
The current breakdown of where the sample locations fall in relation to the flowlines is listed in the table below. The maximum snapping distance was set to 100m. Any points outside of this distance were left unsnapped. The sites in the "Truncated Network" classification are the ones used in the network analysis project. The points used are the observed occupancy sites from December 2013. The whole process is scripted so it should be simple enough to update with new sites as needed.
| Location Classification | Number of Sites |
|---|---|
| Detailed Network Only | 1291 |
| Outside 100 Meter Buffer | 1935 |
| Truncated Network | 33011 |
| Undocumented Stream | 529 |
| Total Sites | 36766 |
| Table 1: Classification of sites | |
The snapping processing is carried out in the mapOccupancySitesToNetwork.py
script. Define the variables in the "Specify inputs" and execute the script in
Arc Python.
networkGrid_DEM- the filepath to the DEM flow gridnetworkGrid_Detailed- the filepath to the high resolution flow gridnetworkGrid_Truncated- the filepath to the truncated flow gridpoints- the filepath to the locations shapefileversion- the version ID of the fish points (e.g. "VTFS")bufferInMeters- length in meters of the maximum snapping distanceworkingDirectory- the filepath to the file geodatabase where snapped points will be saved
Kyle O'Neil
koneil@usgs.gov