Select Page

 

Summary

This tool calculates the average slope of each feature in a polygon layer. For the boundary defined by a polygon layer, NHDPlus version 2 DEM (US EPA, 2015) is clipped using GDAL Utility – gdalwarp (GDAL, n.d.) and input to Taudem’s “pitremove” module (Tarboton, 2014) to create DEM without sinks. Next, slope raster is calculated by Taudem’s “d8flowdir” module with pit-removed DEM. Finally, the average slope for each feature is calculated using python program – rasterstats (Python Software Foundation, 2015). Above procedures were implemented as a service in CSIP (David et al., 2015) environment.

Example

slope

Figure 1. Input Polygon Layer         Figure 2. Slope Layer

 

How to use

From toolbox menu, choose Hydrology, Terrain Analysis, and Slope. In the interface as shown in Figure 3, choose input layer for “Polygon” layer. Optionally, user can create polygon or choose a HUC12 polygon by clicking “Build” button. After choosing input polygon layer, click “Calculate” button. The average slope will be appended to the attribute table of input feature as shown in Figure 4. If input layer has multiple polygon features, the average slope will be calculated for each feature as shown in Figure 5.

slope2

Figure 3. User Interface of Slope Tool

slope3

Figure 4. Input Layer Attribute Table with Average Slope

slope4

Figure 5. Input Layer (multiple polygons) Attribute Table with Average Slope

API Notes

average_slope
The input data is polygon shapefile, which defines input boundary. .shp, .shx and .dbf files should be posted.

Input Parameters

Parameter Type Description
JSON request JSON JSON file, which defines input parameters.
{“metainfo”: {},”parameter”: [{“name”: “boundary”,”value”: “polygon_boundary.shp”}]}

Output Parameters

Parameter Type Description
sd8 tif Slope Raster
results csv zonal statistics result

References

David, O., Lloyd, W., Arabi, M., Rojas, K. (2015). Cloud Service Innovation Platform User Manual and Technical Documentation [draft].
GDAL (n.d.) GDAL Utilities, Retrieved from http://www.gdal.org/gdal_utilities.html
Python Software Foundation (2015). Rasterstats 0.7.0, Retrieved from https://pypi.python.org/pypi/rasterstats/0.7.0
Tarboton, D., David Tarboton Hydrology Research Group, Utah State University. (2014). Taudem version 5.1.2 [Software]. Retrieved from http://hydrology.usu.edu/taudem/taudem5/downloads.html
US Environmental Protection Agency (2015). NHDPlus Version 2: User Guide (Data Model Version 2.1). Retrieved from ftp://ftp.horizon-systems.com/nhdplus/NHDPlusV21/Documentation/NHDPlusV2_User_Guide.pdf