ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

ArgStatistics function

  • Overview
  • Notes
  • Parameters

Overview

The ArgStatistics function calculates arguments of the statistics. There are four ArgStatistics methods in this function: ArgMax, ArgMin, ArgMedian, and Duration.

Notes

In ArgStatistics, all raster bands from every input raster are assigned a 0-based incremental band index, which is first ordered by the input raster index, as shown in the table below, and then by the relative band order within each input raster. For example, if the first input raster (input index 0) has 2 bands: b11 and b12, and the second input raster (input index 1) has 4 bands: b21, b22, b23, and b24, the band index will look like the following table:

BandInput indexBand index

b11

0

0

b12

0

1

b21

1

2

b22

1

3

b23

1

4

b24

1

5

Then, for each pixel, the ArgMax function returns the Band index for which the maximum Pixel value is reached. For example, in the following table, the maximum pixel value is 189, which is stored in Band b21, with the band index 2. So, the ArgMax function will return the value 2.

BandBand indexPixel value

b11

0

33

b12

1

54

b21

2

189

b22

3

145

b23

4

34

b24

5

28

ArgMin is the argument of the minimum, which returns the Band index for which the given pixel attains its minimum value. For example, in the previous table, the minimum Pixel value is 28, which is stored in Band b24, where the Band index is 5. So, the ArgMin function will return the value 5.

The ArgMedian method returns the Band index for which the given pixel attains the median value of values from all bands. Consider values from all bands as an array. After sorting the array in ascending order, the median is the one value separating the lower half of the array from the higher half. More specifically, if the ascend-sorted array has n values, the median is the ith (0-based) value, where:

i = ( (n-1) / 2 )

For example, the previous table is sorted in ascending order by pixel values as shown in the following table. The median is 34, and ArgMedian will return a Band index of 4.

BandBand indexPixel value

b24

5

28

b11

0

33

b23

4

34

b12

1

54

b22

3

145

b21

2

189

The Duration method finds the longest consecutive elements in the array, where each element has a value greater than or equal to Min and less than or equal to Max, and returns its length. The Duration method needs the Min and Max input values.

For example, in the previous table, the longest consecutive elements given for Min=34 and Max=189 is [34, 54, 145, 189], so the duration is 4.

Parameters

ParameterDescription

Method

Select the statistics method to calculate the following:

  • Arg Max—The argument of the maximum, which returns the Band index for which the given pixel attains its minimum value from all the bands. All raster bands from every input raster are assigned a 0-based incremental band index, which is first ordered by the input raster index, and then by the relative band order within each input raster.
  • Arg Min—The argument of the minimum, which returns the Band index for which the given pixel attains its minimum value from all the bands.
  • Arg Median—The argument of the median, which returns the Band index for which the given pixel attains the median value of values from all bands.
  • Duration—The Duration method finds the longest consecutive elements in the array, where each element has a value greater than or equal to Min and less than or equal to Max, and returns its length.

Undefined Class

A constant input that will be returned when no definitive maximum, minimum, or median can be attained. The most common scenario is when the maximum or minimum value occurs more than once among values from all bands. The default value for the undefined constant is 100.

The undefined class is only applicable when the method is ArgMax, ArgMin, or ArgMedian.

Min

The minimum value that you set is the lowest value equal to or greater than the beginning of the duration.

This input is only applicable when the method is Duration.

Max

The maximum value that you set is the highest value equal to or less than the end of the duration.

This input is only applicable when the method is Duration.

Input Raster

The input raster upon which you will perform the various statistical methods.

Index

There are two types of indices in this function: a raster index and a band index. The input index keeps track of each raster input, where each row with the same input index is the same raster. Since a raster can have more than one band, there may be multiple rows with the same raster index. The band index keeps track of each input band. Each band index is unique and cannot have duplicates.

Related topics

  • What are the functions used by a raster or mosaic dataset?
  • Editing function chains in a mosaic dataset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal