Views
Maps Package API Reference Guide
Product Documentation:
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 a new IlvMapRaster instance of that contains unknown values. More...
 
 IlvMapRaster (const IlvMapRaster &source)
 Initializes a new IlvMapRaster instance by copying another one. More...
 
virtual IlBoolean contains (const IlvCoordinate &) const
 Returns IlTrue if some 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) 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 (const IlvCoordinate &point, IlvMapsError &status) const
 Returns the value of the raster at the specified point, expressed in the projection system of the geometry. More...
 
IlShort getValue (IlInt column, IlInt row, IlvMapsError &status) const
 Returns the value corresponding to the given column and row. 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 ()
 Initializes a new empty IlvMapArea instance.
 
- Protected Member Functions inherited from IlvMapGeometry
 IlvMapGeometry ()
 Constructor. More...
 

Detailed Description

This class defines a raster.

Library: ilvmaps

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.

Constructor & Destructor Documentation

◆ IlvMapRaster() [1/2]

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

Initializes a new IlvMapRaster instance of 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() [2/2]

IlvMapRaster::IlvMapRaster ( const IlvMapRaster source)

Initializes a new IlvMapRaster instance by copying another one.

Parameters
sourceThe raster to be copied.

Member Function Documentation

◆ contains()

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

Returns IlTrue if some coordinate is contained in the object.

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

Implements IlvMapArea.

◆ copy()

virtual IlvMapGeometry* IlvMapRaster::copy ( ) const
virtual

Returns a copy of the object.

Returns
An IlvMapGeometry that must be deleted by the user.

Implements IlvMapArea.

◆ getClassInfo()

virtual IlvClassInfo* IlvMapRaster::getClassInfo ( ) const
virtual

Returns the IlvClassInfo of the instance.

Returns
An IlvClassInfo that should not be modified nor deleted.

Implements IlvMapArea.

◆ getColumns()

IlInt IlvMapRaster::getColumns ( ) const

Returns the number of columns in the raster.

Returns
The number of columns in the raster.

◆ getLowerRightCorner()

const IlvCoordinate& IlvMapRaster::getLowerRightCorner ( )

Returns the lower-right corner of the raster.

Returns
The lower-right corner of the raster.

◆ getRows()

IlInt IlvMapRaster::getRows ( ) const

Returns the number of rows in the raster.

Returns
The number of rows in the raster.

◆ getStroke()

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.

◆ getSubElement()

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.

◆ getSubElementCount()

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.

◆ getUpperLeftCorner()

const IlvCoordinate& IlvMapRaster::getUpperLeftCorner ( ) const

Returns the upper-left corner of the raster.

Returns
The upper-left corner of the raster.

◆ getValue() [1/2]

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() method.

Parameters
pointPoint at which the value is queried, expressed in the projection coordinate system of the feature.
statusSet to to IlvMaps::NoError() on return if the value is defined or to UnknownValueStatus(), or to OutOfBoundStatus().
Returns
The value corresponding to the given column and row.

◆ getValue() [2/2]

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.
statusSet to to IlvMaps::NoError() on return if the value is defined or to UnknownValueStatus(), or to OutOfBoundStatus().
Returns
The value corresponding to the given column and row.

◆ getValues()

const IlShort* IlvMapRaster::getValues ( ) const

Returns the array of values.

Returns
The array of values that can be modified, but not deleted.

◆ isCollection()

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.

◆ OutOfBoundStatus()

static IlvMapsError IlvMapRaster::OutOfBoundStatus ( )
static

The error code for out of bound errors.

Returns
The error code for out of bound errors.

◆ UnknownValueStatus()

static IlvMapsError IlvMapRaster::UnknownValueStatus ( )
static

The error code for unknown values.

Returns
The error code for unknown values.