Rank
Краткая информация
Создает растровый объект, в котором каждый пиксел содержит значения из набора входных растров на основе значения входного растра ранга.
Обсуждение
Дополнительные сведения о работе этой функции см. в инструменте Ранг.
Указанный набор растровых данных является временным для растрового объекта. Чтобы сделать его постоянным, вы можете вызвать метод растрового объекта save.
Синтаксис
Rank(rank_raster, rasters, {extent_type}, {cellsize_type}, {process_as_multiband})
| Параметр | Объяснение | Тип данных |
|---|---|---|
|
rank_raster |
The input raster that defines the rank position to be returned. |
Raster |
|
rasters |
The list of input rasters. |
Raster |
|
extent_type |
The method that will be used to compute the extent of the output when the input rasters have different extents.
(Значение по умолчанию — 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.
(Значение по умолчанию — FirstOf) |
String |
|
process_as_multiband |
Specifies how the bands of the input rasters will be processed.
(Значение по умолчанию — False) |
Boolean |
Возвращаемое значение
| Тип данных | Объяснение |
|---|---|
|
Raster |
Выходной растр. |
Пример кода
Вычисляет ранг набора входных растров на основе растра рангов.
# Import system modules
import arcpy
from arcpy.ia import *
#Set the local variables
rank_raster = r"c:\temp\value_raster.tif"
rasters = [r"c:\temp\raster1.tif", r"c:\temp\raster2.tif", r"c:\temp\raster3.tif"]
# Run
output_raster = Rank(rank_raster, rasters, "UnionOf", "FirstOf", True)