#include <GeoPoint.h>
Public Member Functions | |
| LatLonPoint () | |
| LatLonPoint (LocationType latLon) | |
| LatLonPoint (const std::string &latitudeText, const std::string &longitudeText) | |
| LatLonPoint (const std::string &latLonText) | |
| ~LatLonPoint () | |
| LocationType | getCoordinates () const |
| const DmsPoint & | getLatitude () const |
| const DmsPoint & | getLongitude () const |
| std::string | getText (DmsFormatType format=DMS_FULL, int precision=-1) const |
| std::string | getLatitudeText (DmsFormatType format=DMS_FULL, int precision=-1) const |
| std::string | getLongitudeText (DmsFormatType format=DMS_FULL, int precision=-1) const |
| LatLonPoint & | operator= (const LatLonPoint &original) |
| bool | operator== (const LatLonPoint &rhs) const |
This class stores a latitude/longitude pair as DmsPoint objects to provide common text formatting when retrieving the value. In addition to the text formatting, the raw value can also be retrieved.
Definition at line 165 of file GeoPoint.h.
| LatLonPoint::LatLonPoint | ( | ) |
Creates a latitude/longitude point with an initial value of 0° N and 0° E.
| LatLonPoint::LatLonPoint | ( | LocationType | latLon | ) |
Creates a latitude/longitude point with initial raw values.
| latLon | The initial latitude and longitude coordinate. The latitude value must correspond to the x-coordinate of the LocationType, and the longitude value must correspond to the y-coordinate. |
| LatLonPoint::LatLonPoint | ( | const std::string & | latitudeText, | |
| const std::string & | longitudeText | |||
| ) |
Creates a latitude/longitude point with a initial string values for both latitude and longitude.
| latitudeText | A string representing the initial latitude value that can be converted to a numeric raw value. | |
| longitudeText | A string representing the initial longitude value that can be converted to a numeric raw value. |
| LatLonPoint::LatLonPoint | ( | const std::string & | latLonText | ) |
Creates a latitude/longitude point with an initial string value.
| latLonText | A string representing the initial latitude and longitude value that can be converted to numeric raw values. |
| LatLonPoint::~LatLonPoint | ( | ) |
Destroys the latitude/longitude point.
| LocationType LatLonPoint::getCoordinates | ( | ) | const |
Returns the raw value of the latitude/longitude point.
| const DmsPoint& LatLonPoint::getLatitude | ( | ) | const |
Retrieves the latitude value.
| const DmsPoint& LatLonPoint::getLongitude | ( | ) | const |
Retrieves the longitude value.
| std::string LatLonPoint::getText | ( | DmsFormatType | format = DMS_FULL, |
|
| int | precision = -1 | |||
| ) | const |
Returns the latitude/longitude coordinate in a given text format.
| format | The text format for the string. | |
| precision | The number of digits after decimal point. Defaults to three for decimal degrees and seconds and two for decimal minutes. |
| std::string LatLonPoint::getLatitudeText | ( | DmsFormatType | format = DMS_FULL, |
|
| int | precision = -1 | |||
| ) | const |
Returns the latitude value in a given text format.
| format | The text format for the string. | |
| precision | The number of digits after decimal point. Defaults to three for decimal degrees and seconds and two for decimal minutes. |
| std::string LatLonPoint::getLongitudeText | ( | DmsFormatType | format = DMS_FULL, |
|
| int | precision = -1 | |||
| ) | const |
Returns the longitude value in a given text format.
| format | The text format for the string. | |
| precision | The number of digits after decimal point. Defaults to three for decimal degrees and seconds and two for decimal minutes. |
| LatLonPoint& LatLonPoint::operator= | ( | const LatLonPoint & | original | ) |
Sets the latitude and longitude values to that of another latitude/longitude point.
| original | The point from which to set this point's values. |
| bool LatLonPoint::operator== | ( | const LatLonPoint & | rhs | ) | const |
Compares two latitude/longitude points.
| rhs | The latitude/longitude point to compare the values against this point. |