- URL:
- https://<rasteranalysistools-url>/Sample
- Methods:
GET
- Version Introduced:
- 10.8.1
Description
The Sample
task creates a table of cell values from a raster, or set of rasters, for defined locations. The locations are defined by raster cells, polygon features, polyline features, or by a set of points.
The input rasters can be two-dimensional or multidimensional. The structure of the output table changes when the input rasters are multidimensional.
Request parameters
Parameter | Details |
---|---|
(Required) | List of input rasters. The input raster can be the Portal Item ID, Image Service URL, cloud raster dataset, or shared multidimensional raster dataset. At least one type of input needs to be provided in the JSON object. If multiple inputs are given, the itemIds takes the priority. Syntax: List of JSON object describing the input rasters.
|
(Required) | Data identifying positions where you want a sample taken. The input can be an image service or a feature service. Syntax: JSON object describing the input raster or feature. At least one type of input needs to be provided in the JSON object. If multiple inputs are given, the itemid takes the priority. Example
|
(Required) | Name of the output table or feature service holding the sampled cell values. Syntax: JSON object describing the output table Example
|
| Resampling algorithm used when sampling a raster.
Syntax: A string representing the Example
|
| A field containing a different value for every location or feature in the input location raster or point features. Syntax: A string representing the field. Example
|
| Specify the time, depth or other acquisition data associated with the location features. Statistics will be calculated for variables within the dimension range of the following combinations:
Only non-negative values are supported for the following:
Syntax: a list of dictionary objects.
Example
|
| The type of statistic to be calculated.
A string representing the Example
|
| The percentile to calculate when the This value can range from 0 to 100. The default is 90. Syntax: A double representing the Example
|
| The specified distance around the location data features. The buffer distance is specified in the linear unit of the location feature's spatial reference. If the feature uses a geographic reference, the unit will be in degrees. Statistics will be calculated within this buffer area. Syntax: A value representing the Example 1
Syntax: A string representing the buffer distance field in the Example 2
|
| Specifies whether sampled values appear in rows or columns in the output table.
Syntax: A string of one of the keywords. Example
|
| Boolean value to determine if this tool generates an output feature service containing a feature class with sampled values or only a table with sampled values. The default is Values: |
(Optional) | Contains additional settings that affect task execution. This task has the following settings:
Example
|
|
The response format. The default response format is html. Values: |
Response
When you submit a request, the task assigns a unique job ID for the transaction.
Syntax:
{ "jobId": "<unique job identifier>", "jobStatus": "<job status>" }
After the initial request is submitted, you can use the job
to periodically check the status of the job and messages, as described in Check job status. Once the job has successfully completed, use the job
to retrieve the results. To track the status, you can make a request of the following form:
https://<analysis url>/Sample/jobs/<jobId>
Accessing results
When the status of the job request is esri
, you can access the results of the analysis by making a request of the following form:
https://<raster analysis url>/Sample/jobs/<jobId>/results/outSample?token=<your token>&f=json
Parameter | Description |
---|---|
| The output feature service Example:
The result has properties for parameter name, data type, and value. The content of the value is always the output raster dataset's
|