- URL:https://<rasteranalysistools-url>/DeriveStreamAsLine
- Version Introduced:11.2
Description
The DeriveStreamAsLine task generates stream line features from an input surface raster with no prior sink or depression filling required.
Example applications of DeriveStreamAsLine 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:
|
outputStreamFeaturesName (Required) | The name of the output feature service that will contain the stream features. The task will create a feature service of the results. You can define the name of the service. 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.
|
simplify | Specifies whether the output stream lines will be smoothed into simpler shapes. Syntax: A Boolean value as either true or false.
|
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>/DeriveStreamAsLine/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>/DeriveStreamAsLine/jobs/<jobId>/results/<output parameter>
Example usage
The example below is a sample request URL for DeriveStreamAsLine.
https://services.myserver.com/arcgis/rest/services/System/RasterAnalysisTools/GPServer/DeriveStreamAsLine/submitJob
JSON Response example
The response returns the outputStreamFeatures 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": "outputStreamFeatures",
"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.