Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
This class defines a raster. More...
#include <ilviews/maps/geometry/georaster.h>
Public Member Functions | |
IlvMapRaster (const IlvMapRaster &source) | |
Copies a raster. | |
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. | |
virtual IlBoolean | contains (const IlvCoordinate &coordinate) const |
Returns IlTrue if coordinate is contained in the object. | |
virtual IlvMapGeometry * | copy () const |
Returns a copy of the object. | |
virtual IlvClassInfo * | getClassInfo () const |
Returns the IlvClassInfo of the instance. | |
IlInt | getColumns () const |
Returns the number of columns in the raster. | |
const IlvCoordinate & | getLowerRightCorner () |
Returns the lower-right corner of the raster. | |
IlInt | getRows () const |
Returns the number of rows in the raster. | |
virtual const IlvMapCurve * | getStroke () const |
Returns the stroke of the area. | |
virtual const IlvMapGeometry * | getSubElement (IlUInt index) const |
Returns the sub element of index index if the geometry is a collection. | |
virtual IlUInt | getSubElementCount () const |
Returns the number of elements contained in the geometry if the geometry is a collection. | |
const IlvCoordinate & | getUpperLeftCorner () const |
Returns the upper-left corner of the raster. | |
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. | |
IlShort | getValue (IlInt column, IlInt row, IlvMapsError &status) const |
Returns the value corresponding to the given column and row. | |
const IlShort * | getValues () const |
Returns the array of values. | |
virtual IlBoolean | isCollection () const |
Returns IlTrue if the geometry is a collection of other geometries. | |
Static Public Member Functions | |
static IlvMapsError | OutOfBoundStatus () |
The error code for out of bound errors. | |
static IlvMapsError | UnknownValueStatus () |
The error code for unknown values. |
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
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.
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 | ) |
Copies a raster.
source | The raster to be copied. |
virtual IlBoolean IlvMapRaster::contains | ( | const IlvCoordinate & | coordinate | ) | const [virtual] |
Returns IlTrue
if coordinate is contained in the object.
coordinate | The point to be checked. |
IlTrue
if coordinate is contained in the object. Implements IlvMapArea.
virtual IlvMapGeometry* IlvMapRaster::copy | ( | ) | const [virtual] |
Returns a copy of the object.
IlvMapGeometry
that must be deleted by the user. Implements IlvMapArea.
virtual IlvClassInfo* IlvMapRaster::getClassInfo | ( | ) | const [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 const IlvMapCurve* IlvMapRaster::getStroke | ( | ) | const [virtual] |
Returns the stroke of the area.
IlvCurve
object that should not be deleted nor modified. Implements IlvMapArea.
virtual const IlvMapGeometry* IlvMapRaster::getSubElement | ( | IlUInt | index | ) | const [virtual] |
Returns the sub element of index index if the geometry is a collection.
Otherwise, it returns a null pointer.
Implements IlvMapGeometry.
virtual IlUInt IlvMapRaster::getSubElementCount | ( | ) | const [virtual] |
Returns the number of elements contained in the geometry if the geometry is a collection.
Otherwise, it returns 0
.
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(column, row)
method.
point | Point at which the value is queried, expressed in the projection coordinate system of the feature. | |
status | The 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.
column | Column in the raster array. | |
row | Row in the raster array. | |
status | The function sets the value to IlvMaps::NoError() if the value is defined or to UnknownValueStatus() , or to OutOfBoundStatus() . |
const IlShort* IlvMapRaster::getValues | ( | ) | const |
Returns the array of values.
virtual IlBoolean IlvMapRaster::isCollection | ( | ) | const [virtual] |
Returns IlTrue
if the 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 IlvMapsError IlvMapRaster::OutOfBoundStatus | ( | ) | [static] |
The error code for out of bound errors.
static IlvMapsError IlvMapRaster::UnknownValueStatus | ( | ) | [static] |
The error code for unknown values.
© Copyright 2012, 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.