StreamStats_DataPrep ESRI Toolbox
Database Setup
- class StreamStats_DataPrep.databaseSetup
Set up the workspaces needed to process elevation and hydrography data.
This tool is a wrapper on
databaseSetup.databaseSetup()
.Methods
Database Setup inputs.
- getParameterInfo()
Database Setup inputs.
- Parameters:
- Output WorkspaceDEWorkspace (File System)
Folder-type workspace for local folders and geodatabase to be created.
- Main ArcHydro Geodatabase NameGPString
Name of the geodatabase to be created in “Output Workspace.”
- Hydrologic Unit Boundary DatasetDEShapefile or DEFeatureClass
Polygon vector defining local processing units. Should have columns for outwalls and inwalls, see below.
- Outwall FieldField
Field in “Hydrologic Unit Boundary Dataset” used to determine local folders and outwalls.
- Inwall FieldField
Field in “Hydrologic Unit Boundary Dataset” used to determine inwalls.
- Hydrologic Unit Buffer Distance (m)GPString
Distance to buffer local folder polygons.
- Input Hydrography WorkspaceDEWorkspace
Path to folder type workspace with National Hydrography Dataset geodatabases.
- Elevation Dataset TemplateDERasterBand
Raster dataset to pull projection information from, works best as an ESRI grid.
- Alternative Outwall BufferGPString (optional)
Distance for alternative outwall buffer.
- Returns:
- parameterslist
List of input parameters passed to the execute method.
Make Elevation Data Index
- class StreamStats_DataPrep.makeELEVDATAIndex
Create a seamless raster mosaic dataset from input digital elevation tiles.
This tool is a wrapper on
elevationTools.elevIndex()
.Methods
Make ELEV data index inputs
- getParameterInfo()
Make ELEV data index inputs
- Parameters:
- Output GeodatabaseDEWorkspace (Geodatabase)
Path to the geodatabase that will hold the output raster mosaic dataset.
- Output Raster Mosaic Dataset NameGPString
Name of raster mosaic dataset (RMD) to output, defaults to IndexRMD.
- Coordinate SystemGPCoordinateSystem
Coordinate system of input grids and raster mosaic dataset.
- Input Elevation Data workspaceDEWorkspace (Folder)
Path to folder holding input digital elevation models to be included in the raster mosaic dataset.
- Returns:
- parameterslist
List of input parameters passed to the execute method.
Extract Polygons
- class StreamStats_DataPrep.ExtractPoly
Extract a hydrologic unit from a digital elevation model based on a clipping polygon.
This tool is a wrapper on
elevationTools.extractPoly()
.Methods
Extract Polygon inputs.
- getParameterInfo()
Extract Polygon inputs.
- Parameters:
- Output WorkspaceDEWorkspace (Folder)
Path to folder to work in.
- ELEVDATA Raster Mosaic DatasetDEMosaicDataset
Path to the raster mosaic dataset holding the elevation data.
- Clip PolygonGPFeatureLayer
Feature class of the watershed boundary being used for clipping.
- Output GridGPString
Name of the output ESRI grid, defaults to dem_dd.
- Returns:
- parameterslist
List of input parameters passed to the execute method.
Check For NoData Cells
- class StreamStats_DataPrep.CheckNoData
Check for no data cells in a digital elevation model.
This tool is a wrapper on
elevationTools.checkNoData()
.Methods
Check for no data inputs.
- getParameterInfo()
Check for no data inputs.
- Parameters:
- InputGridDERasterBand
Path to raster dataset to examine.
- WorkspaceDEWorkspace (Geodatabase)
Geodatabase-type workspace.
- Output Feature LayerGPString
Name of output feature class, defaults to DEM_NoDataSinks.
- Returns:
- parameterslist
List of input parameters passed to the execute method.
Fill NoData Cells
- class StreamStats_DataPrep.FillNoData
Fill no data cells in a digital elevation model.
This tool is a wrapper on
elevationTools.fillNoData()
.Notes
This tool can be run iteratively to fully fill no data areas that are larger than one cell.
Methods
Fill no data inputs.
- getParameterInfo()
Fill no data inputs.
- Parameters:
- WorkspaceDEWorkspace (Folder)
Path to workspace folder.
- Input GridDERasterBand
Path to raster dataset with no data values to be filled, defaults to DEM_NoDataSinks.
- Output GridGPString
Path to write out filled raster dataset to, defaults to DEM_filled.
- Returns:
- parameterslist
List of input parameters passed to the execute method.
Project and Scale
- class StreamStats_DataPrep.ProjScale
Project and scale a digital elevation model. The default settings assume the digital elevation model uses meters (m) as the z-units.
This tool is a wrapper on
elevationTools.projScale()
.Notes
After scaling, this tool attempts to set the correct z-units; however, if your vertical units are different from your horizontal units it is advised to check the z-units manually.
Methods
Project and scale digital elevation model inputs.
- getParameterInfo()
Project and scale digital elevation model inputs.
- Parameters:
- InWorkSpaceDEWorkspace (Folder)
Path to the workspace folder.
- InGridDERasterBand
Path to the raster dataset to project and scale.
- OutGridGPString
Name for the projected and scaled raster, defaults to dem_raw.
- OutCoordSysGPCoordinateSystem
Coordinate system with which to project or preproject the input raster.
- OutCellSizeanalysis_cell_size
Output cell size to project the input raster to, defaults to 10 horizontal map units.
- RegPtGPString
Registration point for the projected raster, defaults to “0 0”.
- scaleFactGPString
Scale factor to use to convert the projected raster to integers, defaults to 100, converting m to cm. Consider using a larger scale factor as cell-size decreases.
- Returns:
- parameterslist
List of input parameters passed to the execute method.
TopoGrid (optional)
- class StreamStats_DataPrep.TopoGrid
Condition an input DEM using a flowline dendrite prior to hydro-enforcement.
This tool is a wrapper on
topo_grid.topogrid()
.Notes
This function turns the input DEM into a 3D point cloud, thinned using the VIP algorithm so that not all points are retained from the original DEM. The point cloud is used in conjunction with the supplied flowlines to re-interpolate a DEM that is aware of the location of the flowlines and their flow direction.
This is a computationally intensive function. Running it via ESRI ArcPro or Python 3 will be faster than using ESRI ArcMap or Python 2.
Methods
TopoGrid inputs.
- getParameterInfo()
TopoGrid inputs.
- Parameters:
- Output WorkspaceDEWorkspace (Geodatabase)
Path to a geodatabase workspace.
- Dissolved HUC8 boundaryDEFeatureClass or DEShapefile
Feature class to use in bounding the topogrid conditioning process.
- Topogrid Buffer DistanceGPDouble
Distance to buffer the input HUC8 boundary, in the units of the HUC8 boundary.
- 12 Digit Hydrologic Unit Datasets if dissolved HUC8 boundary failedDEFeatureClass or DEShapefile (Optional)
List of HUC12 boundaries to split up TopoGrid computations if the whole domain fails.
- Dendritic Flowline FeaturesDEFeatureClass or DEShapefile
Dendrite used for enforcing flow direction in topogrid.
- Buffered and Projected Elevation DataDERasterBand or DERasterDataset
Input digital elevation model to be conditioned using topogrid.
- Output Cell SizeGPString
Cell size for output digital elevation model, defaults to 10 horizontal map units.
- VIP PercentageGPString
Thinning value used in the Very Important Points (VIP) algorithm to decide how many points from the original raster are retained, defaults to 5 percent.
- SnapGridDERasterBand (Optional)
Raster to snap output grid to.
- Returns:
- parameterslist
List of input parameters passed to the execute method.
Bathymetic Gradient Setup
- class StreamStats_DataPrep.SetupBathyGrad
Prepare bathymetric gradient inputs for use in hydro-enforcement.
This tool is a wrapper on
make_hydrodem.bathymetricGradient()
.Notes
The bathymetric gradient refers to generating a sloping area around the flowline dendrite that ensures the landscape around the dendrite flows to the stream. This also adds a sloping surface to double-line streams and waterbodies to help ensure proper drainage after hydro-enforcement.
Methods
Setup Bathymetric Gradient inputs.
- getParameterInfo()
Setup Bathymetric Gradient inputs.
- Parameters:
- Output WorkspaceDEWorkspace (Geodatabase)
Path to a geodatabase workspace.
- Digital Elevation Model (used for snapping)DERasterBand
Path to a digital elevation model to use for aligning output grids to the rest of the project.
- Dissolved Eight-Digit Hydrologic Unit Code (HUC8) DatasetDEFeatureClass
Feature class of the local folder boundary.
- NHD AreaDEFeatureClass
Feature class of NHD double line streams.
- NHD DendriteDEFeatureClass
Feature class of the flowline dendrite.
- NHD WaterbodyDEFeatureClass
Feature class of the NHD water bodies.
- Cell SizeGPString
Output grid cell size, defaults to 10 horizontal map units.
- Returns:
- parameterslist
List of input parameters passed to the execute method.
Notes
This tool expects that the NHD Dendrite and NHD Area features have an attribute column with the name “FType” populated with feature type codes. In the newer NHD High-Resolution data-sets this attribute is called “FTYPE.” The query used to select features is case sensitive; as such, this attribute needs to be renamed to “FType” for NHD High-Resolution data.
Coastal DEM Processing (optional)
- class StreamStats_DataPrep.CoastalDEM
Prepare coastal areas for hydro-enforcement.
This tool is a wrapper on
make_hydrodem.coastaldem()
.Methods
Coastal digital elevation model processing inputs.
- getParameterInfo()
Coastal digital elevation model processing inputs.
- Parameters:
- WorkspaceDEWorkspace (Folder)
Path to a folder-type workspace.
- Input raw DEMDERasterBand
Original digital elevation model to be corrected for coastal areas, defaults to dem_raw.
- Input LandSea polygon feature classDEFeatureClass
Feature class indicating areas of land and sea.
- Output DEMDERasterBand
Output digital elevation model name, defaults to dem_sea.
- Sea LevelGPString
Value to insert into areas identified as the sea, defaults to -60000 vertical map units.
- Returns:
- parameterslist
List of input parameters passed to the execute method.
Hydro-Enforce DEM
- class StreamStats_DataPrep.HydroDEM
Hydro-Enforce a DEM.
This tool is a wrapper on
make_hydrodem.hydrodem()
.Notes
AGREE defaults should not be changed as this can lead to alignment issues between the flowlines and the resultant hydro-enforced DEM and subsequent products (FDR and FAC).
Methods
- Parameters:
- getParameterInfo()
- Parameters:
- Output WorkspaceDEWorkspace (geodatabase)
Geodatabase-type workspace where output raster will be saved.
- Scratch WorkspaceDEWorkspace (folder)
Folder-type scratch workspace.
- HUC layerDEFeatureClass
Polygon feature class the bounds the local folder you are working in.
- Digital Elevation ModelDERasterBand
Digital elevation model to be hydro-enforced.
- Stream DendriteDEFeatureClass
Polyline feature class describing where streams are on the landscape.
- Snap GridDERasterBand
Raster grid used to align output DEM with other related grids or adjacent local folders.
- NHD Waterbody GridDERasterDataset (optional)
Grid representing waterbodies from the bathymetric gradient step.
- NHD Flowline GridDERasterDataset (optional)
Grid representing flowlines from the bathymetric gradient step.
- Inner WallsDEFeatureClass (optional)
Polyline feature class used to enforce internal drainage.
- Cell SizeGPString
Output cell size, defaults to 10 horizontal map units.
- Drain PlugsDEFeatureClass (optional)
Point feature class representing sink locations.
- HUC bufferGPDouble (optional)
Distance to buffer the HUC layer, defaults to 50 horizontal map units.
- Inner Wall BufferGPDouble (optional)
Distance to buffer the inwall, defaults to 15 horizontal map units.
- Inner Wall HeightGPDouble (optional)
Inwall height, defaults to 150000 vertical map units.
- Outer Wall HeightGPDouble (optional)
Outer wall height, defaults to 300000 vertical map units.
- AGREE bufferGPDouble (optional)
Defaults to 60 horizontal map units.
- AGREE Smooth DropGPDouble (optional)
Defaults to -500 vertical map units.
- AGREE Sharp DropGPDouble (optional)
Defaults to -50000 vertical map units.
- Bowl DepthGPDouble (optional)
Defaults to 2000 vertical map units.
- Returns:
- parameterslist
List of input parameters passed to the execute method.
Adjust Accumulation
- class StreamStats_DataPrep.AdjustAccum
Adjust flow accumulation grids following hydro-enforcement.
This tool is a wrapper on
make_hydrodem.adjust_accum()
.Methods
Adjust flow accumulation grid inputs.
- getParameterInfo()
Adjust flow accumulation grid inputs.
- Parameters:
- Downstream Accumulation GridDERasterDataset
Downstream raster dataset to correct.
- Downstream Flow Direction GridDERasterDataset
Downstream flow direction grid.
- Upstream Flow Accumulation GridsDERasterDataset
Upstream flow accumulation grids to correct the downstream grid with.
- Upstream Flow Direction GridsDERasterDataset
Upstream flow direction grids corresponding to the grids listed above.
- WorkspaceWorkspace (Geodatabase)
Geodatabase to work in.
- Returns:
- parameterslist
List of input parameters passed to the execute method.
Adjust Accumulation Simple
- class StreamStats_DataPrep.AdjustAccumSimp
Simply adjust a flow accumulation grid.
This tool is a wrapper on
make_hydrodem.adjust_accum_simple()
.Methods
Simple flow accumulation grid adjustment inputs.
- getParameterInfo()
Simple flow accumulation grid adjustment inputs.
- Parameters:
- Inlet PointGPFeatureLayer
Point feature class indicating the inlet to the downstream hydrologic unit.
- Flow Direction GridDERasterBand
Flow direction grid of the downstream hydrologic unit.
- Flow Accumulation GridDERasterBand
Flow accumulation grid of the downstream hydrologic unit.
- HydroDEMDERasterBand
Downstream hydrologic unit hydro-enforced digital elevation model.
- Output FACGPRasterDataLayer
Corrected flow accumulation grid.
- Adjustment ValueGPString
Upstream flow accumulation value to correct the downstream hydrologic unit with, defaults to 150000 grid cells.
- Returns:
- parameterslist
List of input parameters passed to the execute method.
Post Hydrodem
- class StreamStats_DataPrep.posthydrodem
ESRI ArcHydro processing using the hydro-enforced DEM and resultant flow direction and flow accumulation grids.
This tool is a wrapper on
make_hydrodem.postHydroDEM()
.Notes
This tool only functions with ESRI ArcMap / Python 2, ESRI ArcPro / Python 3 are currently not supported.
Methods
Post hydro-enforcement processing inputs.
- getParameterInfo()
Post hydro-enforcement processing inputs.
- Parameters:
- WorkspaceDEWorkspace (Geodatabase)
Path to a geodatabase-type workspace.
- hydrodemfacDERasterDataset
Hydro-enforced flow accumulation grid.
- hydrodemfdrDERasterDataset
Hydro-enforced flow direction grid.
- str thresholdGPLong
Stream threshold in raster cells.
- str900 thresholdGPLong
str900 grid or similar threshold, in raster cells.
- Sink LinkDERasterBand
Sink link raster name.
- Returns:
- parameterslist
List of input parameters passed to the execute method.