Select Page

Summary

This tool calculates the average slope length of each feature in a polygon vector layer. If a user defines the boundary, NHDPlus V2 DEM (US Environmental Protection Agency, 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, flow direction raster is calculated by Taudem’s “d8flowdir” module. And slope length raster is calculated by Taudem’s “gridnet” module. According to Hickey (2000), 50% slope decrease ratio was set as the criteria for cutoff pixel, where slope length should be reset to zero. It is implemented by replacing flow direction value at cutoff pixel with nodata value (-32768) before running Taudem’s “gridnet” module. For the starting pixel (where slope length was calculated as zero until this step), the slope length was calculated as each 1/2 of pixel resolution for horizontal or vertical flow direction pixels and sqrt(2)/2 of pixel resolution for diagonal flow direction pixels. Finally, the average slope length for each feature is calculated using python program – zonal_stats (Python Software Foundation, 2015).  Above procedures are implemented as a service in CSIP (David et al., 2015) environment.

Example

Figure 1 shows the table of polygon layer, whose slope length were calculated and appended in the column – slope_length(m).

sl_table

Figure 1. Example of Slope Length Values Added to Polygons Layer.

How to use

From toolbox menu, choose Hydrology, Terrain Analysis, and Slope Length. In the interface as shown in Figure 2, choose input layer for ‘Polygon’. 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 1.

slopelength_gui

Figure 2. User Interface of Slope Length Tool

 

API Notes

slope_length
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 {
“metainfo”: {
},
“parameter”: [
{“name”: “boundary”,”value”: “polygon_boundary.shp”},
{‘name’: ‘r’, ‘value’: x_max},
{‘name’: ‘l’, ‘value’: x_min},
{‘name’: ‘b’, ‘value’: y_min},
{‘name’: ‘t’, ‘value’: y_max}
]
}

Output Parameters

Parameter Type Description
plen tif Slope Length Raster
dir_cut tif Cutoff Flow Direction Raster
results csv zonal statistics of slope length

References

David, O., Lloyd, W., Arabi, M., and 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
Hickey, R., (2000), Slope Angle and Slope Length Solutions for GIS. Cartography, v. 29, no. 1.
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