TrendToRGB

Mit der Image Analyst-Lizenz verfügbar.

Zusammenfassung

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.

Auswertung

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.

Syntax

TrendToRGB (raster, {model_type})
ParameterErklärungDatentyp
raster

The input trend raster.

Raster
model_type

The trend model type information to be converted to RGB.

  • LINEAR—Linear trend information will be converted to RGB. This is the default.
  • HARMONIC—Harmonic trend model information will be converted to RGB.

(Der Standardwert ist LINEAR)

String
Rückgabewert
DatentypErklärung
Raster

The output raster.

Codebeispiel

TrendToRGB example

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")