rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvMapRaster Class Reference

This class defines a raster. More...

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

Inheritance diagram for IlvMapRaster:
IlvMapArea IlvMapGeometry

List of all members.

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 IlvMapGeometrycopy () const
 Returns a copy of the object.
virtual IlvClassInfogetClassInfo () const
 Returns the IlvClassInfo of the instance.
IlInt getColumns () const
 Returns the number of columns in the raster.
const IlvCoordinategetLowerRightCorner ()
 Returns the lower-right corner of the raster.
IlInt getRows () const
 Returns the number of rows in the raster.
virtual const IlvMapCurvegetStroke () const
 Returns the stroke of the area.
virtual const IlvMapGeometrygetSubElement (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 IlvCoordinategetUpperLeftCorner () 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 IlShortgetValues () 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.

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:
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.

Parameters:
source The 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:
coordinate The 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 the sub element of index index if the geometry is a collection.

Otherwise, it returns a null pointer.

Returns:
The sub element of index index if the geometry is a collection.

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.

Returns:
The number of elements contained in the geometry if the geometry is a collection. Otherwise, it 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 ( 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:
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.
IlShort IlvMapRaster::getValue ( IlInt  column,
IlInt  row,
IlvMapsError &  status 
) const

Returns the value corresponding to the given column and row.

Parameters:
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().
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]

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.

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.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© 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.