olp-cpp-sdk
1.22.0
|
A geographic location that uses the WGS84 Coordinate System encoded in a 32-bit unsigned integer. More...
#include <GeoPoint.h>
Public Member Functions | |
GeoPoint (uint32_t xx, uint32_t yy) | |
Creates the GeoPoint instance that uses the location longitude (x ) and latitude (y ) values represented as 32-bit unsigned integers. More... | |
bool | operator== (const GeoPoint &other) const |
Checks whether the values of the GeoPoint and the other parameters are equal. More... | |
bool | operator!= (const GeoPoint &other) const |
Checks whether the values of the GeoPoint and the other parameters are not equal. More... | |
GeoPoint & | operator+= (const GeoPoint &other) |
Adds the values of the GeoPoint and other parameters. More... | |
Public Attributes | |
std::uint32_t | x |
An absolute world X-coordinate value. More... | |
std::uint32_t | y |
An absolute world Y-coordinate value. More... | |
A geographic location that uses the WGS84 Coordinate System encoded in a 32-bit unsigned integer.
Latitude values range from 0 at the equator to 90 degrees north and -90 degrees south. Longitude values range from 0 at the prime meridian to 180 degrees east and -180 degrees west.
The X-Y coordinates system is used to get the geographic location:
The internal representation of angles is radians:
To get GeoPoint
from geographic coordinates, you can use the ToGeoPoint
method of the GeoCoordinates
class.
|
inline |
Creates the GeoPoint
instance that uses the location longitude (x
) and latitude (y
) values represented as 32-bit unsigned integers.
[in] | xx | The X-coordinate value of the location longitude. |
[in] | yy | The Y-coordinate value of the location latitude. |
|
inline |
|
inline |
std::uint32_t olp::geo::GeoPoint::x |
An absolute world X-coordinate value.
The value range for each component is a 32-bit unsigned integer.
The x
value can be calculated using the following formula: x = (x rad + pi) * max(uint32_t) / 2 * pi
.
std::uint32_t olp::geo::GeoPoint::y |
An absolute world Y-coordinate value.
The value range for each component is a 32-bit unsigned integer.
The y
value can be calculated using the following formula: y = (y rad + pi/2) * max(uint32_t) / 2 * pi
.