![]() |
Mapper
0.9.0
API documentation
|
Specifies geographic location by latitude and longitude. More...
#include <latlon.h>
Public Member Functions | |
constexpr | LatLon (double latitude=0.0, double longitude=0.0) noexcept |
Constructs a new LatLon for the latitude and longitude given in degrees. More... | |
constexpr double | latitude () const |
Returns the latitude value in degrees. More... | |
constexpr double | longitude () const |
Returns the longitude value in degrees. More... | |
constexpr bool | operator== (const LatLon &rhs) const |
Returns true if this object has exactly the same latitude and longitude like another. More... | |
constexpr bool | operator!= (const LatLon &rhs) const |
Returns true if this object has not exactly the same latitude and longitude like another. More... | |
Static Public Member Functions | |
static constexpr LatLon | fromRadiant (double latitude, double longitude) noexcept |
Returns a new LatLon for the latitude and longitude given in radiant. More... | |
Friends | |
QDebug | operator<< (QDebug dbg, const LatLon &lat_lon) |
Dumps a LatLon to the debug output. More... | |
Specifies geographic location by latitude and longitude.
Latitude is a geographic coordinate that specifies the north-south position (φ, phi).
Longitude is a geographic coordinate that specifies the east-west position (λ, lambda).
LatLon is meant to be similar to QGeoCoordinate (part of Qt since 5.2). This Qt class might eventually replace LatLon. QGeoCoordinate has altitude as an additional property which is rarely used in Mapper at the moment.
|
inlinenoexcept |
Constructs a new LatLon for the latitude and longitude given in degrees.
|
inlinestaticnoexcept |
Returns a new LatLon for the latitude and longitude given in radiant.
|
inline |
Returns the latitude value in degrees.
|
inline |
Returns the longitude value in degrees.
Returns true if this object has not exactly the same latitude and longitude like another.
FP precision issues are not taken into account.
Returns true if this object has exactly the same latitude and longitude like another.
FP precision issues are not taken into account.
Dumps a LatLon to the debug output.
Note that this requires a reference, not a pointer.