ArgStatistics

サマリー

Creates a raster object in which each pixel contains the band index at which that pixel reached the statistical argument. If the input raster is multidimensional, the output raster object will contain dimension values instead of band indices.

説明

For more information about how this function works, see the ArgStatistics raster function.

The referenced raster dataset for the raster object is temporary. To make it permanent, you can call the raster object's save method.

構文

ArgStatistics (rasters, {stat_type}, {min_value}, {max_value}, {multiple_occurrence_value}, {ignore_nodata})
パラメーター説明データ タイプ
rasters
[rasters,...]

The input raster or list of rasters.

Raster
stat_type

Specifies the statistical argument to extract.

  • MAX The band index or dimension value at which the maximum pixel value is reached will be extracted.
  • MIN The band index or dimension value at which the minimum pixel value is reached will be extracted.
  • MEDIAN The band index or dimension value at which the median pixel value is reached will be extracted.
  • DURATION The longest dimension duration for which the pixel values fall between the minimum and maximum values.

(デフォルト値は次のとおりです None)

String
min_value

The minimum pixel value to be used to extract the duration. This argument is required when the stat_type argument is set to DURATION.

(デフォルト値は次のとおりです None)

Double
max_value

The maximum pixel value to be used to extract the duration. This argument is required when the stat_type argument is set to DURATION.

(デフォルト値は次のとおりです None)

Double
multiple_occurrence_value

The pixel value to use to indicate that a given argument statistic was reached more than once in the input raster dataset. This argument is required when the stat_type argument is set to MIN or MAX.

(デフォルト値は次のとおりです 100)

Integer
ignore_nodata

Specifies whether to ignore NoData values in the calculation.

  • True—The analysis will include all valid pixels in the input rasters and ignore any NoData pixels.
  • False—The analysis will result in NoData if there are any NoData values for the pixels in the input rasters.

(デフォルト値は次のとおりです True)

Boolean
戻り値
データ タイプ説明
Raster

The output raster.

コードのサンプル

ArgStatistics example

Extracts the dimension value at which the maximum temperature was reached for the input multidimensional raster.

import arcpy

argstat_raster = arcpy.ia.ArgStatistics("Temperature_30_years.crf", "MAX","","", 9999)