ArcObjects Component Help  (Core)    

IRasterLayer Interface

Provides access to members that create or modify a raster layer.

Members

Description
Read-only property AreaOfInterest The default area of interest for the layer.
Read-only property BandCount Number of bands in the layer.
Read/write property Cached Indicates if the layer needs its own display cache.
Read-only property ColumnCount Number of columns in the layer.
Method CreateFromDataset Creates a layer from a RasterDataset object.
Method CreateFromFilePath Creates a layer from a file path to raster data.
Method CreateFromRaster Creates a layer from a Raster object.
Read-only property DataFrameExtent Extent of the dataframe that contains the layer.
Read/write property DisplayResolutionFactor Display resolution factor. Factor value is expressed as a percentage between 0 and 100.
Method Draw Draws the layer to the specified display for the given draw phase.
Read-only property FilePath Filepath of the data source.
Read/write property MaximumScale Maximum scale (representative fraction) at which the layer will display.
Read/write property MinimumScale Minimum scale (representative fraction) at which the layer will display.
Read/write property Name Layer name.
Read/write property PrimaryField Layer's primary field.
Read/write property PyramidPresent Indicates if pyramids are present for the layer.
Read-only property Raster Layer's Raster object.
Read/write property Renderer Layer's renderer.
Read-only property RowCount Number of rows in the layer.
Read/write property ShowResolution Indicates if the raster resolution should be displayed in the Table of Contents.
Read/write property ShowTips Indicates if the layer shows map tips.
Write-only property SpatialReference Spatial reference for the layer.
Read-only property SupportedDrawPhases Supported draw phases.
Read-only property TipText Map tip text at the specified location.
Read-only property Valid Indicates if the layer is currently valid.
Read/write property Visible Indicates if the layer is currently visible.
Read/write property VisibleExtent Visible extent of the layer in the data frame.

Inherited Interfaces

Interfaces Description
ILayer Provides access to members that work with all layers.

CoClasses that implement IRasterLayer

CoClasses and Classes Description
RasterLayer Raster layer source and display options.

Remarks

The RasterLayer visualizes all types of raster data supported by ArcGIS except raster catalogs, which must use the RasterCatalogTable and RasterCatalogLayer .

The Raster object obtained from the layer will have had its properties modified by the layer. Therefore, it will not have the extent and cell size of the original dataset. Because these properties have been set, the raster will not be able to use its default settings either. This is because the Raster is used by the RasterLayer to perform resampling, reprojection if necessary, and data type conversion when needed.

The easiest way to access the unmodified Raster is to open a RasterDataset based on the file path from the layer and use the CreateDefaultRaster method to get the desired raster.

A raster layer can be initialized with a path to a disk-based raster dataset, a Raster object, or a RasterDataset object. This example shows how to create a RasterLayer from a file path, Raster (pRaster),or RasterDataset (pRasterDataset).

'Cocreate the new RasterLayer
Dim pRasLyr as IRasterLayer
Set pRasLyr =New RasterLayer
'Initialize one of the following three methods
pRasLyr.CreateFromFilePath "D:\data \dem.bsq"
pRasLyr.CreateFromDataset pRasterDataset
pRasLyr.CreateFromRaster pRaster

See Also

ILayer Interface