Rogue Wave Views
Maps Package API Reference Guide
Product Documentation:

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

An IlvCoordinate object is a point defined by two values in double precision. More...

#include <ilviews/maps/coord.h>

Public Member Functions

 IlvCoordinate (IlDouble x=0.0, IlDouble y=0.0)
 This constructor initializes a new instance of IlvCoordinate. More...
 
IlBoolean isCloseTo (const IlvCoordinate &other, IlDouble tolerance=0.0)
 Checks if two coordinates are close. More...
 
void move (IlDouble x, IlDouble y)
 This member function takes existing coordinates and moves them to another position. More...
 
IlvCoordinateoperator= (const IlvCoordinate &c)
 This member function copies c to the current coordinates. More...
 
int operator== (const IlvCoordinate &c) const
 Tests equality of two coordinates. More...
 
void translate (IlDouble dx, IlDouble dy)
 Translates an IlvCoordinate. More...
 
void translate (const IlvCoordinate &dc)
 Translates an IlvCoordinate. More...
 
IlDouble x () const
 Returns the x value. More...
 
void x (IlDouble x)
 Sets the x value. More...
 
IlDouble y () const
 Returns the y value. More...
 
void y (IlDouble y)
 Sets the y value. More...
 

Detailed Description

An IlvCoordinate object is a point defined by two values in double precision.

An IlvCoordinate object is a point defined by two values in double precision. The class IlvCoordinate is the basic data structure for computing projections. The x and y values designate either the Cartesian coordinates resulting from a forward projection or the latitude and the longitude obtained by inverse computation. Library: ilvmaps

Constructor & Destructor Documentation

IlvCoordinate::IlvCoordinate ( IlDouble  x = 0.0,
IlDouble  y = 0.0 
)

This constructor initializes a new instance of IlvCoordinate.

Parameters
xThe x value.
yThe y value.

Member Function Documentation

IlBoolean IlvCoordinate::isCloseTo ( const IlvCoordinate other,
IlDouble  tolerance = 0.0 
)

Checks if two coordinates are close.

This member function returns IlTrue if the distance between the x and y values of the current coordinates and the one of the coordinates other are less than the value specified by the parameter tolerance.

void IlvCoordinate::move ( IlDouble  x,
IlDouble  y 
)

This member function takes existing coordinates and moves them to another position.

Parameters
xThe new x value.
yThe new y value.
IlvCoordinate& IlvCoordinate::operator= ( const IlvCoordinate c)

This member function copies c to the current coordinates.

Returns
The current coordinates.
int IlvCoordinate::operator== ( const IlvCoordinate c) const

Tests equality of two coordinates.

This member function tests whether two coordinates are equal. Because a strict comparison of floating values may not be significant, you can also use the function isCloseTo, documented below.

void IlvCoordinate::translate ( IlDouble  dx,
IlDouble  dy 
)

Translates an IlvCoordinate.

This member function shifts existing coordinates to another location by means of a delta-distance approach. The dx and dy values represent the distance between the current position of the coordinates and the target position.

Parameters
dxThe x translation.
dyThe y translation.
void IlvCoordinate::translate ( const IlvCoordinate dc)

Translates an IlvCoordinate.

This member function shifts existing coordinates to another location by means of a delta-distance approach. This member function performs the same operation as the previous one, except that instead of specifying a distance by means of x and y values, the dc parameter is passed as an IlvCoordinate object.

IlDouble IlvCoordinate::x ( ) const

Returns the x value.

Returns
The x value.
void IlvCoordinate::x ( IlDouble  x)

Sets the x value.

Parameters
xThe new x value.
IlDouble IlvCoordinate::y ( ) const

Returns the y value.

Returns
The y value.
void IlvCoordinate::y ( IlDouble  y)

Sets the y value.

Parameters
yThe new y value.

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