This class defines a raster. More...
#include <ilviews/maps/geometry/georaster.h>
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 IlvMapGeometry * | copy () const |
Returns a copy of the object. More... | |
virtual IlvClassInfo * | getClassInfo () const |
Returns the IlvClassInfo of the instance. More... | |
IlInt | getColumns () const |
Returns the number of columns in the raster. More... | |
const IlvCoordinate & | getLowerRightCorner () |
Returns the lower-right corner of the raster. More... | |
IlInt | getRows () const |
Returns the number of rows in the raster. More... | |
virtual const IlvMapCurve * | getStroke () const |
Returns the stroke of the area. More... | |
virtual const IlvMapGeometry * | getSubElement (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 IlvCoordinate & | getUpperLeftCorner () 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 IlShort * | getValues () 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 IlvClassInfo * | ClassInfo () |
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... | |
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
.
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.
upperLeftCorner | Upper-left corner of the raster. |
lowerRightCorner | Lower-right corner of the raster. |
columns | Number of columns in the raster. |
rows | Number of rows in the raster. |
values | Array 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. |
copy | If 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). |
useUnknownValue | If IlTrue , an unknown value is specified. |
unknownValue | Value meaning "unknown value". |
IlvMapRaster::IlvMapRaster | ( | const IlvMapRaster & | source | ) |
Initializes a new IlvMapRaster
instance by copying another one.
source | The raster to be copied. |
|
virtual |
Returns IlTrue
if some coordinate is contained in the object.
coordinate | The point to be checked. |
IlTrue
if coordinate is contained in the object. Implements IlvMapArea.
|
virtual |
Returns a copy of the object.
IlvMapGeometry
that must be deleted by the user. Implements IlvMapArea.
|
virtual |
Returns the IlvClassInfo
of the instance.
IlvClassInfo
that should not be modified nor deleted. Implements IlvMapArea.
IlInt IlvMapRaster::getColumns | ( | ) | const |
Returns the number of columns in the raster.
const IlvCoordinate& IlvMapRaster::getLowerRightCorner | ( | ) |
Returns the lower-right corner of the raster.
IlInt IlvMapRaster::getRows | ( | ) | const |
Returns the number of rows in the raster.
|
virtual |
Returns the stroke of the area.
IlvCurve
object that should not be deleted nor modified. Implements IlvMapArea.
|
virtual |
Returns a sub element of a collection geometry.
index | The index of the sub-geometry to be retrieved. |
0
if it is not. Implements IlvMapGeometry.
|
virtual |
Returns the number of elements contained in the geometry if the geometry is a collection.
0
. Implements IlvMapGeometry.
const IlvCoordinate& IlvMapRaster::getUpperLeftCorner | ( | ) | const |
Returns the upper-left corner of the raster.
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.
point | Point at which the value is queried, expressed in the projection coordinate system of the feature. |
status | Set 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.
column | Column in the raster array. |
row | Row in the raster array. |
status | Set to to IlvMaps::NoError() on return if the value is defined or to UnknownValueStatus() , or to OutOfBoundStatus() . |
const IlShort* IlvMapRaster::getValues | ( | ) | const |
Returns the array of values.
|
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
.
IlTrue
if the geometry is a collection of other geometries. Implements IlvMapGeometry.
|
static |
The error code for out of bound errors.
|
static |
The error code for unknown values.