Use a stretch renderer to enhance the visual contrast of raster data for analysis.
Use case
An appropriate stretch renderer can enhance the contrast of raster imagery, allowing the user to control how their data is displayed for efficient imagery analysis.
How to use the sample
Choose one of the stretch parameter types:
Standard deviation - a linear stretch defined by the standard deviation of the pixel values
Min-max - a linear stretch based on minimum and maximum pixel values
Percent clip - a linear stretch between the defined percent clip minimum and percent clip maximum pixel values
Then configure the parameters and click 'Update renderer'.
How it works
Create a Raster from a raster file.
Create a RasterLayer from the Raster.
Add the layer to the map.
Create a StretchRenderer, specifying the stretch parameters and other properties.
Apply the Renderer to the raster layer.
Relevant API
ColorRamp
MinMaxStretchParameters
PercentClipStretchParameters
Raster
RasterLayer
StandardDeviationStretchParameters
StretchParameters
StretchRenderer
Offline data
This sample downloads the following items from ArcGIS Online automatically: