HighestPosition

Краткая информация

Создает растровый объект, где каждый пиксел содержит позицию растра с максимальным значением в наборе растров.

Обсуждение

Дополнительные сведения о работе этой функции см. в инструменте Максимальное положение.

Указанный набор растровых данных является временным для растрового объекта. Чтобы сделать его постоянным, вы можете вызвать метод растрового объекта save.

Синтаксис

HighestPosition (rasters, {extent_type}, {cellsize_type})
ПараметрОписаниеТип данных
rasters
[rasters,...]

The list of input rasters.

None
extent_type

The method that will be used to compute the extent of the output when the input rasters have different extents.

  • FirstOfThe output extent will be defined using the extent of the first input raster.
  • LastOfThe output extent will be defined using the extent of the last input raster.
  • IntersectionOfThe output extent will be defined as the intersecting area of the input rasters.
  • UnionOfThe output extent will be defined as the total extent of the input rasters.

(Значение по умолчанию — FirstOf)

String
cellsize_type

The method that will be used to compute the pixel size of the output when the input rasters have different pixel sizes.

  • FirstOfThe output pixel size will be defined using the pixel size of the first input raster.
  • LastOfThe output pixel size will be defined using the pixel size of the last input raster.
  • MaxOfThe output pixel size will be defined using the maximum pixel size of the input rasters.
  • MeanOfThe output pixel size will be defined using the mean of both input rasters.
  • MinOfThe output pixel size will be defined using the minimum pixel size of the input rasters.

(Значение по умолчанию — FirstOf)

String
Возвращаемое значение
Тип данныхОписание
Raster

Выходной растр.

Пример кода

Пример HighestPosition

Вычисляет растр с максимальным значением в наборе входных растров.

# Import system modules
import arcpy
from arcpy.ia import *

#Set the local variables
rasters = [r"c:\temp\raster1.tif", r"c:\temp\raster2.tif", r"c:\temp\raster3.tif"] 

#Execute
Highest_raster = HighestPosition(rasters, "UnionOf", "FirstOf")