RasterLayer

Displays raster data in a map or scene. In its simplest form, raster data consists of a matrix of cells (or pixels) organized into rows and columns (or a grid) where each cell contains a value representing information. Raster layer can support these main types of raster data sources:

  • Raster files - path to a file on the device

  • Remote ArcGIS Image services, see ImageServiceRaster

  • Raster files within GeoPackages, see GeoPackageRaster

  • Mosaic datasets, see MosaicDatasetRaster

You can change how a raster layer is visualized by creating a RasterRenderer and applying it to the layer. Each raster layer supports identify on its individual cells when it is displayed in a MapView or SceneView. The raster layer adopts the loadable pattern; many of its properties are initialized asynchronously. See Loadable for more information.

If a raster dataset has just one value associated with each cell it is called a single-band raster. For example, in a digital elevation model (DEM) each cell contains one value representing the elevation at that location.

A satellite image, however, commonly has multiple bands representing different wavelengths of the electromagnetic spectrum. Landsat imagery, for example, contains seven bands that represent data from the visible and infrared parts of the spectrum. Rasters are particularly useful for remote sensing tasks, such as monitoring vegetation and seeing through smoke to analyze an active fire.

Raster datasets can be quite large. The size of the dataset depends on the following:

  • The geographic extent of the data

  • The size of the cells used (resolution)

  • The number of bands

As with any data consumed locally, file size can be an issue for storage as well as for transferring datasets over the network.

Since

200.1.0

See also

ImageServiceRaster
GeoPackageRaster
MosaicDatasetRaster

Constructors

Link copied to clipboard
fun RasterLayer(item: Item)

Creates a new raster layer object from a image service portal item.

Link copied to clipboard
fun RasterLayer(raster: Raster)

Creates a raster layer object. Use this function to create a raster layer from the input raster data source.

Properties

Link copied to clipboard

The raster source on this layer.

Link copied to clipboard

The raster renderer for this layer

Inherited properties

Link copied to clipboard

The attribution text for the layer.

Link copied to clipboard

The brightness of the layer.

Link copied to clipboard
open override val canChangeVisibility: Boolean

A flag indicating whether the layer content's visibility can be changed. A flag indicating whether the layer content visibility can be changed. Will return false if an error occurs.

Link copied to clipboard

The contrast of the layer.

Link copied to clipboard

The description for the layer. The description of the layer.

Link copied to clipboard

The full extent of this layer, which is the extent where all layer data is contained. You can use this to zoom to all of the data contained in this layer. For feature layers, the extent is retrieved from the tables extent.

Link copied to clipboard
open override val fullTimeExtent: StateFlow<TimeExtent?>

The full time extent of the object. A null if the object is not time aware or if an error occurs.

Link copied to clipboard

The gamma of the layer.

Link copied to clipboard
var id: String

The unique identifying string for the layer, for example specified in a map or scene. The id is used by other parts of this API to refer to a specific Layer, such as in a set of FeatureFenceParameters or a FacilityLayerDefinition. If not supplied, all layers will be assigned a unique id when created.

Link copied to clipboard

Whether the layer supports identify. If the layer is not loaded it may return false if identify support is determined by metadata that is not yet available.

Link copied to clipboard
open override var isPopupEnabled: Boolean

A flag indicating whether the PopupDefinition defined on the PopupSource is enable / disable. Will return false if an error occurs.

Link copied to clipboard
open override var isTimeFilteringEnabled: Boolean

A flag indicating whether the object must use the time extent defined on the owning GeoView to filter its data.

Link copied to clipboard
open override var isVisible: Boolean

The layer content's visibility. The layer content visibility. Will return false if an error occurs.

Link copied to clipboard
val item: Item?

The item the layer has been created from.

Link copied to clipboard
open override val loadStatus: StateFlow<LoadStatus>

The load status.

Link copied to clipboard

The maximum scale for the layer. This controls the maximum scale level the layer can zoom to. All of the connected map views will be updated.

Link copied to clipboard

The minimum scale for the layer. This controls the minimum scale level the layer can zoom to. All of the connected map views will be updated.

Link copied to clipboard
open override var name: String

The name of this layer.

Link copied to clipboard

The opacity for the layer. All of the connected map views will be updated.

Link copied to clipboard
open override var popupDefinition: PopupDefinition?

The pop-up definition. The PopupDefinition associated with the popup source. A null if an error occurs or if the popup source is not associated with a pop-up definition.

Link copied to clipboard
open override var showInLegend: Boolean

A flag indicating whether the layer content participates in the legend. A flag indicating whether the layer content is shown in the legend.

Link copied to clipboard

The spatial reference of the layer.

Link copied to clipboard
open override val subLayerContents: StateFlow<List<LayerContent>>

The sub layer contents of a layer content.

Link copied to clipboard
open override val supportsTimeFiltering: Boolean

A flag indicating whether the object supports filtering its contents by time values with the extent set on the owning GeoView.

Link copied to clipboard
open override val timeInterval: TimeValue?

The suggested time slider step size for this time aware object. Can be null if no time interval is suggested for this time aware object.

Link copied to clipboard
open override var timeOffset: TimeValue?

The time offset applied to this object. The offset is subtracted from the time extent set on the owning GeoView. This allows for data from different periods of time to be compared.

Link copied to clipboard
val visibilityChanged: SharedFlow<Boolean>

Callback invoked when the visibility of the layer changes.

Functions

Link copied to clipboard
open override fun clone(): RasterLayer

Clones the RasterLayer.

Inherited functions

Link copied to clipboard
open override fun cancelLoad()

Cancels loading metadata for the Loadable object.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open suspend override fun fetchLegendInfos(): Result<List<LegendInfo>>

Fetches the list of legend info.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun isVisibleAtScale(scale: Double): Boolean

Returns the layer content's effective visibility at the specified scale. Returns the effective layer content visibility. This effective visibility takes care of the effective visibility of the parents at the specified scale. Will return false if an error occurs.

Link copied to clipboard
open suspend override fun load(): Result<Unit>

Loads the metadata for the object.

Link copied to clipboard
open suspend override fun retryLoad(): Result<Unit>

Loads or retries loading metadata for the object.