Aquatic Grouping Tool - PNHP/SDM_Tools GitHub Wiki

Setup

  1. Download the SDM_Tools scripts from GitHub and save to your computer. To add the toolbox ("SDM_Tools.pyt") to your project, click Insert > Toolbox > Add Toolbox and browse to the toolbox location and select it. The toolbox should appear in your project in the Toolboxes node within the Catalog pane.
  2. Load all the NHD Feature Classes into your ArcGIS project from the geodatabase located at G:\chris\_AdditionalStuffToSortFromMoBIprep\chris\AquaticModelPrep_ctracey\US_flowline_network.gdb.
  3. Load your layer(s) of training features. These can be a combination of point, line, and polygon data, but there need to have a consistently named species identifier field (e.g. GNAME) between all feature classes.

Note: all NHD and training features layers should be projected to the same projection (in units of meters) in order to facilitate accurate distance measurements.

Step 1 - Grouping Observations

Note: the first time you run the tool, you are going to need to load a few of the NHD feature classes into it. You'll need the following feature classes from the above gdb:

  • NHD FLowlines - US_flowline_network.gdb\NHDFlowline_Network
  • NHD catchments - US_flowline_network.gdb\NHD_Catchment
  • Network Dataset built on NHD flowlines - US_flowline_network.gdb\FlowlinesGrouping\FlowlinesGrouping_ND. You probably have to add this and navigate to the *_ND file in the database and not just drag and drop it in.
  • Dams/Barrier Points - The US_flowline_network.gdb\NID_2014 layer is the National Inventory of Dams from Corps. You can replace with any barrier layer as long it is snapped to the flowline layer.

I have typically run the tool from the project history and just change the species so I don't have to load these each time.

  1. Click on the Aquatic Network Grouping tool in the toolbox
  2. Select the version of ArcGIS you are using. If on MoBI01, this would be ArcGIS Pro.
  3. Load your input layers. These should be in the project. If you are loading multiple sources, make sure they share the same field for the species name. You can have multiple sources of one feature type (e.g. point). Definition queries and selections work with this tool. Also, if you have multiple species in the input files, the tool will cycle through each of them in turn.
  4. Load the various NHD layers. See above.
  5. Input the separation distance. We've typically been using the EO Separation distance if it makes sense.
  6. Enter the Snap distance. This is the distance that a particular training feature will be snapped to the the flowline. We typically use 100m, but it could be greater if its a really wide river and training features are mapped on the shoreline. However, too great a distance may group feutures over watershed boundaries.
  7. Run the tool. The tool will produce an layer in the output geodatabase with the form of <CUTECODE>_PresenceFlowlines

Step 2 - Manual edits

  1. Load the output file into the GIS.
  2. Scan the map looking for erroneously grouped flowlines. For example, side tribs may not be habitat for the species.
  3. Delete and flowlines that should not be included as training data for the model.

Step 3 - Creating the CSV file

  1. Click on the Export to CSV Format tool in the toolbox
  2. Load the presence flowlines from the previous step. Make sure no features are selected as this will limit the output.
  3. Load the COMID field. This should be COMID in the feature class.
  4. Load the UID field. This isn't all that important and can be any of the fields with a unique number. I like to use ORIG_FID.
  5. Load the GNAME field.
  6. Load the group_id field
  7. Load the RA field.
  8. Load the OBSDATE field, which should be a date (possible just a last obs year).
  9. Select the output location for the CSV file. This is the file of training data for the model and will be named <CUTECODE>.csv. This can be the occurrence folder in the modeling location.
  10. Hit Run.

Note: You can rerun this tool from the history so you don't have to fill in all the fields again.

⚠️ **GitHub.com Fallback** ⚠️