Rogue Wave Views
Maps Package API Reference Guide
Product Documentation:

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

#include <ilviews/maps/maps.h>

Static Public Member Functions

static IlvMapsError ClassError ()
 Indicates that a bad class has been passed to a method or constructor. More...
 
static IlvBitmapCreateBitmap (IlvDisplay *display, IlvDim width, IlvDim height, IlUShort *data, IlUShort nbColors, IlUChar *redColorMap, IlUChar *greenColorMap, IlUChar *blueColorMap)
 Creates an IlvBitmap from specified image description. More...
 
static IlvMapsError CreateError (const char *messageId)
 Creates a new error code. More...
 
static char * DegreeToDMS (char *buffer, IlDouble degree, IlBoolean lat)
 Converts an angle value from degrees to DMS. More...
 
static IlDouble DegreeToRadian (IlDouble degree)
 Converts an angle value from degrees to radian. More...
 
static IlvMapsError DMSToRadian (const char *dms, IlDouble &outValue)
 Converts a string representing an angle expressed in DMS to radian. More...
 
static const char * GetErrorMessage (IlvMapsError error, IlvDisplay *display)
 Returns the localized message corresponding to an error. More...
 
static const char * GetErrorMessageId (IlvMapsError error)
 Returns the message corresponding to an error. More...
 
static IlvMapsError IllegalArgument ()
 Indicates that a method or constructor parameter is illegal. More...
 
static IlvMapsError IndexError ()
 Indicates that a bad index has been passed to a method or constructor. More...
 
static IlvMapsError Insufficient_memory ()
 Indicates that no more memory is available. More...
 
static IlvMapsError NoError ()
 Indicates no error status. More...
 
static IlvMapsError Number_format_Error ()
 Indicates that a number format error occurred. More...
 
static IlDouble Pi ()
 Returns the value of PI. More...
 
static IlDouble RadianToDegree (IlDouble radian)
 Converts an angle value from radian to degrees. More...
 
static char * RadianToDMS (char *buffer, IlDouble radian, IlBoolean lat)
 Converts an angle value from radian to DMS. More...
 
static IlvMapsError UnitConverter_zero_divisor ()
 Indicates that an unit converter has a bad factor. More...
 
static IlvMapsError UnknownGeometry ()
 Indicates that an unknown geometry has been encountered. More...
 

Detailed Description

Library: ilvmaps

This class provides the basic services you need to use the cartography add-on, such as converting degrees to radian and handling errors. Library: ilvmaps

Member Function Documentation

static IlvMapsError IlvMaps::ClassError ( )
static

Indicates that a bad class has been passed to a method or constructor.

Returns
The "class error" IlvMapsError.
static IlvBitmap* IlvMaps::CreateBitmap ( IlvDisplay display,
IlvDim  width,
IlvDim  height,
IlUShort data,
IlUShort  nbColors,
IlUChar redColorMap,
IlUChar greenColorMap,
IlUChar blueColorMap 
)
static

Creates an IlvBitmap from specified image description.

This function facilitates the creation of an IlvBitmap from an image description consisting of a color map and the color indexes of each point. This kind of description is often used in raster map formats and many map readers can use it.

The array data specifies the color indexes of each point in the bitmap. Its size should be at least of width * height. The color of the pixel located at (x,y) is specified in data [x + y * width].

Warning
Since ViewsMaps 2.0, the creation of bitmaps is handled by the graphic framework, using a IlvMapImage geometry and a IlvDefaultImageRenderer.
Parameters
displayThe IlvDisplay where to create the bitmap.
widthThe width of the bitmap.
heightThe height of the bitmap.
dataThe array specifying the color indexes of each point in the bitmap.
nbColorsIndicates the number of colors in the color map.
redColorMapAn array representing the values of the red components in the color maps, in the range [0-255].
greenColorMapAn array representing the values of the green components in the color maps, in the range [0-255].
blueColorMapAn array representing the values of the blue components in the color maps, in the range [0-255].
Returns
The created IlvBitmap.
See also
IlvMapImage, IlvMapRaster, IlvDefaultImageRenderer, IlvDefaultRasterRenderer.
static IlvMapsError IlvMaps::CreateError ( const char *  messageId)
static

Creates a new error code.

This function allocates a new error code for the Rogue Wave Views message messageId.

Warning
You can use the IlvMessageDataBase instance of display, which is obtained by the IlvDisplay::getDatabase() method to register the translations of messageId. The IlvMessageDataBase class is defined and documented in the Rogue Wave Views product.
Parameters
messageIdThe message for the new error.
Returns
A new IlvMapsError error code.
static char* IlvMaps::DegreeToDMS ( char *  buffer,
IlDouble  degree,
IlBoolean  lat 
)
static

Converts an angle value from degrees to DMS.

This static member function converts a double representing degrees to a DMS string (DMS stands for Degrees, Minutes, and Seconds). The format is xxDxx'xx"L, where L is one of N, S, E, W.

If the lat argument is set to IlTrue, the function considers that the value to be translated is a latitude and will end the DMS string with N or S, depending on the sign of degree. If lat is set to IlFalse, the function considers that the value to be translated is a longitude and will end the DMS string with E or W.

Parameters
bufferThe buffer of characters that contains the DMS. This array must be large enough to contain at least 12 characters.
degreeThe value of the angle to be converted, expressed in degrees.
latSpecifies whether this conversion is for latitude.
Returns
The buffer containing the DMS encoded angle.
static IlDouble IlvMaps::DegreeToRadian ( IlDouble  degree)
static

Converts an angle value from degrees to radian.

This static member function converts an angle value expressed in degrees to its equivalent in radian.

Parameters
degreeThe value of the angle, expressed in degrees.
Returns
The value of the angle, expressed in radian.
static IlvMapsError IlvMaps::DMSToRadian ( const char *  dms,
IlDouble outValue 
)
static

Converts a string representing an angle expressed in DMS to radian.

This static member function converts to radian a string that specifies an angle in degrees, minutes, and seconds. The usual format of the string is: [+/-]xxDxx'xx"[N/S/E/W]</tt>. For example: <tt>25D33'25"N, or -25D33'25".

Parameters
dmsThe angle specification in DMS.
outValueReturns the decoded value.
Returns
IlvMaps::NoError() if the value has been decoded, an error otherwise.
static const char* IlvMaps::GetErrorMessage ( IlvMapsError  error,
IlvDisplay display 
)
static

Returns the localized message corresponding to an error.

This static member function interprets the error code returned by some of the cartography member functions, such as IlvProjection::forward(). This function returns the error message corresponding to the IlvMapsError argument in the current language of display.

Parameters
errorThe error code which the message is to be returned to.
displayThe display for which the message has to be localized.
Returns
A localized string describing the error.
static const char* IlvMaps::GetErrorMessageId ( IlvMapsError  error)
static

Returns the message corresponding to an error.

This static member function interprets the error codes returned by some of the cartography member functions, such as IlvProjection::forward(). This function returns a Rogue Wave Views message corresponding to the error code.

Parameters
errorThe error code which the message is to be returned to.
Returns
A string describing the error.
static IlvMapsError IlvMaps::IllegalArgument ( )
static

Indicates that a method or constructor parameter is illegal.

Returns
The "illegal argument" IlvMapsError.
static IlvMapsError IlvMaps::IndexError ( )
static

Indicates that a bad index has been passed to a method or constructor.

Returns
The "illegal index" IlvMapsError.
static IlvMapsError IlvMaps::Insufficient_memory ( )
static

Indicates that no more memory is available.

Returns
The "no more memory" IlvMapsError.
static IlvMapsError IlvMaps::NoError ( )
static

Indicates no error status.

Returns
The "no error" IlvMapsError.
static IlvMapsError IlvMaps::Number_format_Error ( )
static

Indicates that a number format error occurred.

Returns
The "number format error" IlvMapsError.
static IlDouble IlvMaps::Pi ( )
static

Returns the value of PI.

Returns
The value of PI.
static IlDouble IlvMaps::RadianToDegree ( IlDouble  radian)
static

Converts an angle value from radian to degrees.

This static member function converts an angle value expressed in radian to its equivalent in degrees.

Parameters
radianThe value of the angle, expressed in radian.
Returns
The value of the angle, expressed in degrees.
static char* IlvMaps::RadianToDMS ( char *  buffer,
IlDouble  radian,
IlBoolean  lat 
)
static

Converts an angle value from radian to DMS.

This static member function converts a double representing radian to a DMS string (DMS stands for Degrees, Minutes and Seconds). The format is xxDxx'xx"L, where L is one of N, S, E, W.

If the lat argument is set to IlTrue, the function considers that the value to be translated is a latitude and ends the DMS string with N or S, depending on the sign of radian. If lat is set to IlFalse, the function considers that the value to be translated is a longitude and ends the DMS string with E or W.

Parameters
bufferThe buffer of characters that contains the DMS. This array must be large enough to contain at least 12 characters.
radianThe value of the angle to be converted, expressed in radian.
latSpecifies whether this conversion is for latitude.
Returns
The buffer containing the DMS encoded angle.
static IlvMapsError IlvMaps::UnitConverter_zero_divisor ( )
static

Indicates that an unit converter has a bad factor.

Returns
The "bad factor error" IlvMapsError.
static IlvMapsError IlvMaps::UnknownGeometry ( )
static

Indicates that an unknown geometry has been encountered.

Returns
The "unknown geometry error" IlvMapsError.

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