![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
This class represents a single geodetic coordinate.
It allows changes to the coordinate, through its latitude and longitude, as well as providing relational operators for coordinates.
Public Member Functions | |
TSLLatLongCoord () | |
TSLLatLongCoord (double lat, double lon) | |
double | latitude () const |
void | latitude (double latitude) |
double | longitude () const |
void | longitude (double longitude) |
TSLLatLongCoord | operator+ (const TSLLatLongCoord &anotherLatLongCoord) const |
TSLLatLongCoord | operator- (const TSLLatLongCoord &anotherLatLongCoord) const |
TSLLatLongCoord & | operator+= (const TSLLatLongCoord &delta) |
TSLLatLongCoord & | operator-= (const TSLLatLongCoord &delta) |
TSLLatLongCoord & | operator= (const TSLLatLongCoord &anotherLatLongCoord) |
bool | operator> (const TSLLatLongCoord &anotherLatLongCoord) const |
bool | operator< (const TSLLatLongCoord &anotherLatLongCoord) const |
bool | operator== (const TSLLatLongCoord &anotherLatLongCoord) const |
bool | operator!= (const TSLLatLongCoord &anotherLatLongCoord) const |
double | distance (const TSLLatLongCoord &anotherCoord) const |
double | squareDistance (const TSLLatLongCoord &anotherCoord) const |
void | translate (double dlat, double dlon) |
void | translate (const TSLLatLongCoord &delta) |
void | setVal (double lat, double lon) |
Static Public Member Functions | |
static void | clampByWrapping (const double latIn, const double lonIn, double &latOut, double &lonOut) |
static void | clampByWrapping (double &lat, double &lon) |
static TSLLatLongCoord | createWrapped (double lat, double lon) |
Protected Attributes | |
double | m_latitude |
double | m_longitude |
|
inline |
|
inline |
Construct a TSLLatLongCoord object from a latitude and a longitude.
lat | The latitude |
lon | The longitude |
|
inlinestatic |
Clamp (by wrapping, not saturation) a latitude and a longitude to the range [-90,90]x[-180,180].
|
inlinestatic |
Clamp (by wrapping, not saturation) a latitude and a longitude to the range [-90,90]x[-180,180].
|
inlinestatic |
Construct a TSLLatLongCoord where the lat and lon are adjusted (by wrapping, not saturation) to be in the range [-90,90]x[-180,180].
|
inline |
Calculate the distance between this coordinate and another.
This assumes that the latitude and longitude form a regular planar grid, nominally in degrees.
|
inline |
Query the latitude.
|
inline |
Set the latitude.
If the new latitude value is greater than 90 degrees or less than -90 degrees, then it will be clamped into range.
latitude | New value |
|
inline |
Query the longitude.
|
inline |
Set the longitude.
If the new longitude value is greater than 180 degrees or less than -180 degrees, then the value will be clamped.
longitude | New value |
|
inline |
Compares two coordinates.
anotherLatLongCoord | Source comparison. |
|
inline |
Adds two geodetic coordinates.
Translates the coordinates by the specified delta coordinate.
anotherLatLongCoord | Delta coordinate. |
|
inline |
Translates the LHS geodetic coordinate by the RHS.
delta | Delta coordinate. |
|
inline |
Subtracts two geodetic coordinates.
Translates the coordinate by the negative of the specified delta coordinate.
anotherLatLongCoord | Delta coordinate. |
|
inline |
Translates the LHS geodetic coordinate by the negative of the RHS.
delta | Delta coordinate. |
|
inline |
Less than operator.
Performs a comparison between two coordinates.
anotherLatLongCoord | Source comparison. |
|
inline |
Assignment operator.
Assigns the lat, long values of the argument coordinate to those of this coordinate.
anotherLatLongCoord | Source for new value. |
|
inline |
Compares two coordinates.
anotherLatLongCoord | Source comparison. |
|
inline |
Greater than operator.
Performs a comparison between two coordinates.
anotherLatLongCoord | Source comparison. |
|
inline |
|
inline |
Calculate the square of the distance between this coordinate and another.
This assumes that the latitude and longitude form a regular planar grid, nominally in degrees.
|
inline |
|
inline |
Translates the point by the delta values passed in. If the result would be outside [-90,90]x[-180,180], it will be clamped to that range.
dlat | latitude value to translate by (degrees). |
dlon | longitude value to translate by (degrees). |
|
protected |
|
protected |