- URL:https://<rasteranalysistools-url>/DeriveStreamAsRaster
- Version Introduced:11.2
Description
The DeriveStreamAsRaster task generates a stream raster from an input surface raster with no prior sink or depression filling required.
Example applications of DeriveStreamAsRaster include the following:
- Extract streams from a DEM.
- Consider sink or depression cell locations through the inputDepressionsData parameter in the extraction of streams and determine flow accumulation at each cell of the surface raster, allowing water flow into depression locations but not outward.
Request parameters
Parameter | Details |
---|---|
inputSurfaceRaster (Required) | The input raster representing a surface. Syntax: This parameter can be specified as a portal item ID, a URL to a raster image service layer, a cloud raster dataset, or a shared raster dataset. Examples:
|
outputStreamRasterName (Required) | The name of the output stream image service that will be created. You can specify the name, or you can create an empty service using Portal Admin Sharing API and use the return JSON object as input to this parameter. Syntax: A JSON object describes the name of the output or the output raster. Output name example:
Output raster examples:
|
inputDepressionsData | An optional dataset that defines real depressions. The depressions can be defined through a raster or a feature layer. If the input is a raster, the depression cells must take a valid value, including zero, and the areas that are not depressions must be NoData. Raster input example:
Feature input examples:
|
inputWeightRaster | An optional input raster dataset that defines the fraction of flow that contributes to flow accumulation at each cell. The weight is only applied to the accumulation of flow. If no accumulation weight raster is specified, a default weight of 1 will be applied to each cell. Example:
|
accumulationThreshold |
The threshold for determining whether a given cell is part of a stream in terms of the total area that flows into such cell. |
streamDesignationMethod | Specifies the method that will be used to assign a unique value of stream sections between intersections or an order to the segments of streams in the output.
|
forceFlow | Specifies whether edge cells will always flow outward or follow normal flow rules. Syntax: A Boolean value as either false or true.
|
context | Contains additional settings that affect task processing. This task has the following settings:
|
f | The response format. The default response format is html. Values: html | json | pjson |
Response
When you submit a request, the task assigns a unique job ID for the transaction.
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}
After the initial request is submitted, you can use the jobId to periodically check the status of the job and messages as described in Checking job status. Once the job has successfully completed, you use the jobId to retrieve the results. To track the status, you can make a request of the following form:
https://<raster analysis tools url>/DeriveStreamAsRaster/jobs/<jobId>
When the status of the job request is esriJobSucceeded, you can access the results of the analysis by making a request of the following form:
https://<raster analysis tools url>/DeriveStreamAsRaster/jobs/<jobId>/results/<output parameter>
Example usage
The example below is a sample request URL for DeriveStreamAsRaster.
https://services.myserver.com/arcgis/rest/services/System/RasterAnalysisTools/GPServer/DeriveStreamAsRaster/submitJob
JSON Response example
The response returns the outputStreamRaster output parameter, which has properties for parameter name, data type, and value. The content of value is the output raster dataset itemId value and the image service URL.
{
"paramName": "outputStreamRaster",
"dataType": "GPString",
"value": {
"itemId": "f121390b85ef419790479fc75b493efd",
"url": "https://<server name>/arcgis/rest/services/Hosted/<service name>/ImageServer"
}
}
References
Hack, J. T. 1957. "Studies of Longitudinal Stream Profiles in Virginia and Maryland." Geological Survey Professional Paper 294: 45–95.
Metz, M., Mitasova, H., & Harmon, R. S. 2011. "Efficient extraction of drainage networks from massive, radar-based elevation models with least cost path search." Hydrology and Earth System Sciences 15(2): 667-678.