Skip To Content
ArcGIS Developer
Dashboard

Find Argument Statistics

Description

Find Argument Statistics diagram

The FindArgumentStatistics task is used to extract the dimension value or band index at which a given statistic is attained for each pixel in a multidimensional or multiband raster.

License:
As of 10.8, you must license your ArcGIS Server as an ArcGIS Image Server to use this resource.

Request parameters

ParameterDetails
inputRaster

(Required)

The portal folder ID, portal item ID, image service URL, cloud multidimensional or multi-band raster dataset or shared multidimensional or multi-band raster dataset that will be added to the image collection. At least one type of input needs to be provided in the JSON object.

Syntax: A JSON object describes the input raster.


inputRaster={"folderId": <portal folder id>}
inputRaster={"itemId": [<portal item id>]}
inputRaster={"url": [<image service url>]}
inputRaster={"uri": [<cloud raster uri or shared data path>]}

outputName

(Required)

The output image collection name or URL. The image service must exist before you add the images.

Output hosted image service properties. If the hosted image service is already created, the portal item ID or service URL can be given to the service tool. The output path of the raster dataset generated in the raster store will be used to update the existing service definition. The service tool can also generate new hosted image service with the given service properties. The output hosted image service is stored in raster store and shared on either the Raster Analysis Image Server or Image Hosting Image Server depending on the Enterprise configuration.

Syntax: A JSON object describes the output multidimensional or multiband raster.

NOTE: Set "image,metadata" as image service capabilities to make sure the output image service can be recognized as multidimensional by other raster analysis tools.

Example:

//Portal Item ID
{"itemId": <portal item id>}

//Image Service URL
{"url": <image service url}

//Service Properties
{"serviceProperties":{"name":"testrasteranalysis",
  "serviceUrl":"https://<server name>/server/rest/services/Hosted/testrasteranalysis/ImageServer"},
  "itemProperties":{"itemId":"8cfbd3ec25584d0d8f4ed23b8ff7c43b", "folderId", "sdfwerfbd3ec25584d0d8f4",: }}

dimension

(Optional; Required if inputRaster is multidimensional)

The dimension from which the statistic will be extracted.

Syntax: A string representing the dimension name.

Example

dimension="StdTime"
dimensionDefinition

(Optional)

Specifies the dimension interval for which the data will be analyzed.

  • ALL—The data values will be analyzed across all slices. This is the default.
  • INTERVAL_KEYWORD—The variable data will be analyzed using a commonly known interval.

Syntax: A string of one of the keywords.

Example

dimensionDefinition=ALL
intervalKeyword

(Optional; Required when dimension is StdTime and dimensionDefinition is INTERVAL_KEYWORD)

Specifies the keyword interval that will be used when analyzing along the dimension.

  • HOURLY—The statistic will be extracted for the hour in which the statistic was reached.
  • DAILY—The statistic will be extracted for the day in which the statistic was reached.
  • WEEKLY—The statistic will be extracted for the week in which the statistic was reached.
  • MONTHLY—The statistic will be extracted for the month in which the statistic was reached.
  • QUARTERLY—The statistic will be extracted for the quarter in which the statistic was reached.
  • YEARLY—The statistic will be extracted for the year in which the statistic was reached.
  • RECURRING_DAILY—The statistic will be extracted across days.
  • RECURRING_WEEKLY—The statistic will be extracted across weeks.
  • RECURRING_MONTHLY—The statistic will be extracted across months.
  • RECURRING_QUARTERLY—The statistic will be extracted across quarters.

Syntax: A string of one of the keywords.

Example

intervalKeyword="HOURLY"
variables

(Optional)

The variable or variables to be analyzed. If the input raster is not multidimensional, the pixel values of the multiband raster are considered the variable. If the input raster is multidimensional and no variable is specified, all variables with the selected dimension will be analyzed.

For example, to find the years in which temperature values were highest, specify temperature as the variable to be analyzed. If you do not specify any variables and you have both temperature and precipitation variables, both variables will be analyzed and the output multidimensional raster will include both variables.

Syntax: A list containing the variables.

Example:

variables=["temp"]
statisticsType

(Optional)

The statistic to extract from the variable or variables along the given dimension.

  • ARGUMENT_MIN—The dimension value at which the minimum variable value is reached will be extracted. This is the default.
  • ARGUMENT_MAX—The dimension value at which the maximum variable value is reached will be extracted.
  • ARGUMENT_MEDIAN—The dimension value at which the median variable value is reached will be extracted.
  • DURATION—The longest dimension duration for which the variable values fall between the minimum and maximum values.

Syntax: A string of one of the keywords.

Example:

statisticsType=ARGUMENT_MIN
minValue

(Optional; Required when statisticsType is DURATION)

The minimum variable value to be used to extract the duration.

Syntax: A double value.

maxValue

(Optional; Required when statisticsType is DURATION)

The maximum variable value to be used to extract the duration.

Syntax: A double value.

multipleOccurrenceValue

(Optional)

The pixel value to use to indicate that a given argument statistic was reached more than once in the input raster dataset. If not specified, the pixel value will be the value of the dimension the first time the argument statistic is reached.

Syntax: An integer.

Example:

multipleOccurrenceValue=9999
ignoreNoData

(Optional)

Specifies whether NoData values are ignored in the analysis.

  • true—The analysis will include all valid pixels along the time dimension and ignore any NoData pixels. This is the default.
  • false—The analysis will result in NoData if there are any NoData values for the pixel along the time dimension.

Syntax: A Boolean value as either true or false

Example:

ignoreNodata=true
context

(Optional)

Contains additional settings that affect task execution. This task has the following settings:

  • Cell Size (cellSize)—The output raster will have the resolution specified by cell size.
  • Extent (extent)—A bounding box that defines the analysis area.
  • Output Spatial Reference (outSR)—The output raster will be projected into the output spatial reference.
  • Parallel Processing Factor (parallelProcessingFactor)—The specified number or percentage of processes will be used for the analysis.
  • Resampling Method (resamplingMethod)—Specifies the resampling method that will be used when creating the raster dataset for download.
    • NEAREST—The value of the closest cell will be used to assign a value to the output cell when resampling. This is the default.
    • BILINEAR—The new value of a cell will be based on a weighted distance average of the four nearest input cell centers.
    • CUBIC—The new value of a cell will be based on fitting a smooth curve through the 16 nearest input cell centers.
  • Snap Raster (snapRaster)—The output raster will have its cells aligned with the specified snap raster.

f

The response format. The default response format is html.

Values: html | json

Example usage

Below is a sample request URL for FindArgumentStatistics:

https://services.myserver.com/arcgis/rest/services/System/RasterAnalysisTools/GPServer/FindArgumentStatistics

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 jobId to periodically check the status of the job and messages, as described in Check job status. Once the job has successfully completed, use the jobId to retrieve the results. To track the status, you can make a request of the following form:

https://<analysis-url>/FindArgumentStatistics/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://<rasteranalysis-url>/FindArgumentStatistics/jobs/<jobId>/results/result/outputRaster?token=<yourtoken>&f=json

JSON Request example


inputRasters={"itemId": ["1780d648db3545bba8661ad98df824a4"]}&
imageCollection={"itemId": "780d648db3545bba8661ad98df824a4"}&
rasterType={
  "Raster": {"itemId": "04180233981a4b978755d854687e149e"}, 
  "VisibleBandID": "3", 
  "InfraredBandId": "4"
}

JSON Response example

The response returns the results output parameter, which has properties for parameter name, data type, and value. The content of value is always the image service URL.


{
  "paramName": "result",
  "dataType": "GPString",
  "value": {
		  "url": "https://<server name>/arcgis/rest/services/Hosted/<service name>/ImageServer"
  }
}

Related topics