IRasterProps Interface

Provides access to members that control the most common raster properties.

Members

Name Description
Read/write property Extent The extent of the Raster.
Read/write property Height Height in pixels.
Read-only property IsInteger Indicates if the data is integer.
Read/write property MapModel Map to raster transformation information.
Method MeanCellSize Returns the approximate cell size of the raster.
Read/write property NoDataValue Data value used to indicate invalid or excluded data.
Read/write property PixelType Data type of the pixels.
Read/write property SpatialReference SpatialReference of the Raster.
Read/write property Width Width in pixels.

IRasterProps.Extent Property

The extent of the Raster.

Public Property Extent As IEnvelope
public IEnvelope Extent {get; set;}

IRasterProps.Height Property

Height in pixels.

Public Property Height As Integer
public int Height {get; set;}

IRasterProps.IsInteger Property

Indicates if the data is integer.

Public ReadOnly Property IsInteger As Boolean
public bool IsInteger {get;}

IRasterProps.MapModel Property

Map to raster transformation information.

Public Property MapModel As IRasterMapModel
public IRasterMapModel MapModel {get; set;}

IRasterProps.MeanCellSize Method

Returns the approximate cell size of the raster.

Public Function MeanCellSize ( _
) As IPnt
public IPnt MeanCellSize (
);

IRasterProps.NoDataValue Property

Data value used to indicate invalid or excluded data.

Public Property NoDataValue As Object
public object NoDataValue {get; set;}

Remarks

Specifying a single NoData value for a multiband raster, the NoData value will apply to each raster band in the raster. To set different NoData value for each band, pass an array, each element in the array sets the NoData value for the corresponding band, to this property.

IRasterProps.PixelType Property

Data type of the pixels.

Public Property PixelType As rstPixelType
public rstPixelType PixelType {get; set;}

IRasterProps.SpatialReference Property

SpatialReference of the Raster.

Public Property SpatialReference As ISpatialReference
public ISpatialReference SpatialReference {get; set;}

IRasterProps.Width Property

Width in pixels.

Public Property Width As Integer
public int Width {get; set;}

Classes that implement IRasterProps

Classes Description
MosaicRaster A mosaic of rasters.
Raster An in-memory representation of a dynamic raster that can perform resampling and reprojection.
RasterBand A representation of a single band of a raster dataset on disk.

Remarks

IRasterProps interface accesses the properties of the RasterBand, Raster and MosaicRaster such as width, height, pixel depth spatial reference, etc.

For Raster and MosaicRaster, IRasterProps can also modify the properties of the objects, such as reprojecting a raster from one spatial reference to another, change the width, height, extent, pixel type of the raster. These modifications only affect the in-memory raster representation and in no way change any of the raster dataset. You can persist the modifications to a new raster datast using ISaveAs::SaveAs or IRasterBandCollection::SaveAs.

The Height and Width properties return the number of rows and columns in the Raster. This height and width determine the number of rows and columns into which to divide the input extent.

The Extent property controls the extent for which data in the Raster will be read. If you set a smaller extent to the Raster without specifying the width and height, you will have a Raster with the extent you set, original width and height, and reduced cell size.

The PixelType property controls the bit depth and data type of the values in the raster. If the PixelType specified is not the same as a band of the raster, the pixel values will automatically be converted to the correct data type.

The NoDataValue controls an array of values used to represent NoData. This variant array of values has the pixel type of the raster and contains one NoData value for each band. This allows the different bands in the raster to contain a different NoData value. If there is no NoDataValue in the band, the value in the corresponding member of the array is set outside the pixel depth range.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.