Image Analyst ライセンスで利用できます。
概要
Converts a trend raster to a three-band (red, green, and blue) raster.
The trend raster is generated from the GenerateTrend function. The TrendToRGB function may also be used on the change analysis raster generated from the Analyze Changes Using CCDC tool.
ディスカッション
There are two model conversion options:
- Linear—The linear trend information from the model is converted to RGB. Use this option to visualize the slope and intercept coefficients for a linear trend model.
- Harmonic—The harmonic trend information from the model is converted to RGB. Use this option to visualize the harmonic regression coefficients from the trend raster or change analysis raster.
For more information about how this function works, see the Trend to RGB 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.
構文
TrendToRGB (raster, {model_type})
パラメーター | 説明 | データ タイプ |
raster | The input trend raster. | Raster |
model_type | The trend model type information to be converted to RGB.
(デフォルト値は次のとおりです LINEAR) | String |
データ タイプ | 説明 |
Raster | The output raster. |
コードのサンプル
This example converts the harmonic model information for a precipitation trend raster to RGB.
# Import system modules
import arcpy
from arcpy.ia import *
# Check out the ArcGIS Image Analyst extension license
arcpy.CheckOutExtension("ImageAnalyst")
# Set the analysis environments
arcpy.env.workspace = "C:/arcpyExamples/data"
# Set the local variables
trend_raster = "precip_trend.tif"
model_type = "HARMONIC"
# convert the trend raster to a RGB raster
precipTrend_rgb = TrendToRGB(trend_raster,model_type)
# save the output
precipTrend_rgb.save("C:/arcpyExamples/outputs/precipTrend_rgb.tif")