Rogue Wave Views
Maps Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions | Static Public Member Functions
IlvMapRaster Class Reference

This class defines a raster. More...

#include <ilviews/maps/geometry/georaster.h>

Inheritance diagram for IlvMapRaster:
IlvMapArea IlvMapGeometry

Public Member Functions

 IlvMapRaster (const IlvCoordinate &upperLeftCorner, const IlvCoordinate &lowerRightCorner, IlInt columns, IlInt rows, IlShort *values, IlBoolean copy, IlBoolean useUnknownValue=IlFalse, IlShort unknownValue=-1)
 Initializes an instance of IlvMapRaster that contains unknown values. More...
 
 IlvMapRaster (const IlvMapRaster &source)
 Copies a raster. More...
 
virtual IlBoolean contains (const IlvCoordinate &coordinate) const
 Returns IlTrue if coordinate is contained in the object. More...
 
virtual IlvMapGeometrycopy () const
 Returns a copy of the object. More...
 
virtual IlvClassInfogetClassInfo () const
 Returns the IlvClassInfo of the instance. More...
 
IlInt getColumns () const
 Returns the number of columns in the raster. More...
 
const IlvCoordinategetLowerRightCorner ()
 Returns the lower-right corner of the raster. More...
 
IlInt getRows () const
 Returns the number of rows in the raster. More...
 
virtual const IlvMapCurvegetStroke () const
 Returns the stroke of the area. More...
 
virtual const IlvMapGeometrygetSubElement (IlUInt index) const
 Returns a sub element of a collection geometry. More...
 
virtual IlUInt getSubElementCount () const
 Returns the number of elements contained in the geometry if the geometry is a collection. More...
 
const IlvCoordinategetUpperLeftCorner () const
 Returns the upper-left corner of the raster. More...
 
IlShort getValue (IlInt column, IlInt row, IlvMapsError &status) const
 Returns the value corresponding to the given column and row. More...
 
IlShort getValue (const IlvCoordinate &point, IlvMapsError &status) const
 Returns the value of the raster at the specified point, expressed in the projection system of the geometry. The method computes the row and the column of the point and calls the getValue(column, row) method. More...
 
const IlShortgetValues () const
 Returns the array of values. More...
 
virtual IlBoolean isCollection () const
 Checks if this geometry is a collection of other geometries. More...
 

Static Public Member Functions

static IlvMapsError OutOfBoundStatus ()
 The error code for out of bound errors. More...
 
static IlvMapsError UnknownValueStatus ()
 The error code for unknown values. More...
 
- Static Public Member Functions inherited from IlvMapGeometry
static IlvClassInfoClassInfo ()
 Returns the class info. More...
 

Additional Inherited Members

- Protected Member Functions inherited from IlvMapArea
 IlvMapArea ()
 Constructor. More...
 
- Protected Member Functions inherited from IlvMapGeometry
 IlvMapGeometry ()
 Constructor. More...
 

Detailed Description

This class defines a raster.

A raster is a georeferenced array of values. It is defined on a rectangular area and has a value for each point in this area. It can be used, for example, to represent terrain elevations, atmospheric pressures, temperatures, and so on.

The instances of this class can be rendered by an IlvDefaultFeatureRenderer or by an IlvDefaultRasterRenderer. Library: ilvmaps

Constructor & Destructor Documentation

IlvMapRaster::IlvMapRaster ( const IlvCoordinate upperLeftCorner,
const IlvCoordinate lowerRightCorner,
IlInt  columns,
IlInt  rows,
IlShort values,
IlBoolean  copy,
IlBoolean  useUnknownValue = IlFalse,
IlShort  unknownValue = -1 
)

Initializes an instance of IlvMapRaster that contains unknown values.

Parameters
upperLeftCornerUpper-left corner of the raster.
lowerRightCornerLower-right corner of the raster.
columnsNumber of columns in the raster.
rowsNumber of rows in the raster.
valuesArray of values. The value of row y and of column x is accessed by values [y * columns + x]. The value of row 0 and column 0 is at the upper-left corner of the rectangle.
copyIf IlTrue, the provided array of values is copied. If no copy is required, the array should have been allocated using the new IlShort[] operator (it will be released with the delete [] operator).
useUnknownValueIf IlTrue, an unknown value is specified.
unknownValueValue meaning "unknown value".
IlvMapRaster::IlvMapRaster ( const IlvMapRaster source)

Copies a raster.

Parameters
sourceThe raster to be copied.

Member Function Documentation

virtual IlBoolean IlvMapRaster::contains ( const IlvCoordinate coordinate) const
virtual

Returns IlTrue if coordinate is contained in the object.

Parameters
coordinateThe point to be checked.
Returns
IlTrue if coordinate is contained in the object.

Implements IlvMapArea.

virtual IlvMapGeometry* IlvMapRaster::copy ( ) const
virtual

Returns a copy of the object.

Returns
An IlvMapGeometry that must be deleted by the user.

Implements IlvMapArea.

virtual IlvClassInfo* IlvMapRaster::getClassInfo ( ) const
virtual

Returns the IlvClassInfo of the instance.

Returns
An IlvClassInfo that should not be modified nor deleted.

Implements IlvMapArea.

IlInt IlvMapRaster::getColumns ( ) const

Returns the number of columns in the raster.

Returns
The number of columns in the raster.
const IlvCoordinate& IlvMapRaster::getLowerRightCorner ( )

Returns the lower-right corner of the raster.

Returns
The lower-right corner of the raster.
IlInt IlvMapRaster::getRows ( ) const

Returns the number of rows in the raster.

Returns
The number of rows in the raster.
virtual const IlvMapCurve* IlvMapRaster::getStroke ( ) const
virtual

Returns the stroke of the area.

Returns
An IlvCurve object that should not be deleted nor modified.

Implements IlvMapArea.

virtual const IlvMapGeometry* IlvMapRaster::getSubElement ( IlUInt  index) const
virtual

Returns a sub element of a collection geometry.

Parameters
indexThe index of the sub-geometry to be retrieved.
Returns
The sub element of index index if the geometry is a collection or 0 if it is not.

Implements IlvMapGeometry.

virtual IlUInt IlvMapRaster::getSubElementCount ( ) const
virtual

Returns the number of elements contained in the geometry if the geometry is a collection.

Returns
The number of elements contained in the geometry if the geometry is a collection. If it is not, this method returns 0.

Implements IlvMapGeometry.

const IlvCoordinate& IlvMapRaster::getUpperLeftCorner ( ) const

Returns the upper-left corner of the raster.

Returns
The upper-left corner of the raster.
IlShort IlvMapRaster::getValue ( IlInt  column,
IlInt  row,
IlvMapsError &  status 
) const

Returns the value corresponding to the given column and row.

Parameters
columnColumn in the raster array.
rowRow in the raster array.
statusThe function sets the value to IlvMaps::NoError() if the value is defined or to UnknownValueStatus(), or to OutOfBoundStatus().
Returns
The value corresponding to the given column and row.
IlShort IlvMapRaster::getValue ( const IlvCoordinate point,
IlvMapsError &  status 
) const

Returns the value of the raster at the specified point, expressed in the projection system of the geometry. The method computes the row and the column of the point and calls the getValue(column, row) method.

Parameters
pointPoint at which the value is queried, expressed in the projection coordinate system of the feature.
statusThe function sets the value to IlvMaps::NoError() if the value is defined or to UnknownValueStatus(), or to OutOfBoundStatus().
Returns
The value corresponding to the given column and row.
const IlShort* IlvMapRaster::getValues ( ) const

Returns the array of values.

Returns
The array of values that can be modified, but not deleted.
virtual IlBoolean IlvMapRaster::isCollection ( ) const
virtual

Checks if this geometry is a collection of other geometries.

The composite geometries predefined in Rogue Wave Views Maps are: IlvMapGeometryCollection, IlvMapMultiPoint, IlvMapSegmentString and its subclasses, IlvMapMultiCurve and IlvMapMultiArea.

Returns
IlTrue if the geometry is a collection of other geometries.

Implements IlvMapGeometry.

static IlvMapsError IlvMapRaster::OutOfBoundStatus ( )
static

The error code for out of bound errors.

Returns
The error code for out of bound errors.
static IlvMapsError IlvMapRaster::UnknownValueStatus ( )
static

The error code for unknown values.

Returns
The error code for unknown values.

© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.