OSM::Coordinate
#include <datatypes.h>
Public Member Functions | |
constexpr | Coordinate (double lat, double lon) |
constexpr | Coordinate (uint32_t lat, uint32_t lon) |
constexpr | Coordinate (uint64_t z) |
constexpr bool | isValid () const |
constexpr double | latF () const |
constexpr double | lonF () const |
constexpr bool | operator== (Coordinate other) const |
constexpr uint64_t | z () const |
Public Attributes | |
uint32_t | latitude = std::numeric_limits<uint32_t>::max() |
uint32_t | longitude = std::numeric_limits<uint32_t>::max() |
Detailed Description
Coordinate, stored as 1e7 * degree to avoid floating point precision issues, and offset to unsigned values to make the z-order curve work.
Can be in an invalid state with coordinates out of range, see isValid().
- See also
- https://en.wikipedia.org/wiki/Z-order_curve for the z-order curve stuff
Definition at line 37 of file datatypes.h.
Constructor & Destructor Documentation
◆ Coordinate() [1/3]
|
inlineexplicitconstexpr |
Definition at line 40 of file datatypes.h.
◆ Coordinate() [2/3]
|
inlineexplicitconstexpr |
Definition at line 44 of file datatypes.h.
◆ Coordinate() [3/3]
|
inlineexplicitconstexpr |
Create a coordinate from a z-order curve index.
Definition at line 50 of file datatypes.h.
Member Function Documentation
◆ isValid()
|
inlinenodiscardconstexpr |
Definition at line 60 of file datatypes.h.
◆ latF()
|
inlinenodiscardconstexpr |
Definition at line 80 of file datatypes.h.
◆ lonF()
|
inlinenodiscardconstexpr |
Definition at line 84 of file datatypes.h.
◆ operator==()
|
inlinenodiscardconstexpr |
Definition at line 64 of file datatypes.h.
◆ z()
|
inlinenodiscardconstexpr |
Z-order curve value for this coordinate.
Definition at line 70 of file datatypes.h.
Member Data Documentation
◆ latitude
uint32_t OSM::Coordinate::latitude = std::numeric_limits<uint32_t>::max() |
Definition at line 89 of file datatypes.h.
◆ longitude
uint32_t OSM::Coordinate::longitude = std::numeric_limits<uint32_t>::max() |
Definition at line 90 of file datatypes.h.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:55:21 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.