1#ifndef OSMSCOUT_GEOCOORD_H
2#define OSMSCOUT_GEOCOORD_H
161 buffer[0]=std:: byte(latValue >> 0u);
162 buffer[1]=std::byte(latValue >> 8u);
163 buffer[2]=std::byte(latValue >> 16u);
165 buffer[3]=std::byte(lonValue >> 0u);
166 buffer[4]=std::byte(lonValue >> 8u);
167 buffer[5]=std::byte(lonValue >> 16u);
169 buffer[6]=std::byte((latValue >> 24u) & 0x07u) | std::byte((lonValue >> 20u) & 0x70u);
181 for (
size_t i=0; i<27; i++) {
185 number=number+((latValue >> bit) & 0x01u);
188 number=number+((lonValue >> bit) & 0x01u);
199 return lat==other.lat && lon==other.lon;
241 static bool Parse(
const std::string& text,
266 GeoCoord Add(
const Bearing &bearing,
const Distance &distance)
const;
273 return lat==other.lat && lon==other.lon;
281 return lat!=other.lat || lon!=other.lon;
286 return std::tie(lat, lon) < std::tie(other.lat, other.lon);
#define OSMSCOUT_API
Definition CoreImportExport.h:45
Distance operator-(const GeoCoord &other) const
Definition GeoCoord.h:294
static constexpr int MaxLatitude
Definition GeoCoord.h:81
const GeoCoord coord
Definition RouteStateAgent.h:49
bool operator<(const GeoCoord &other) const
Definition GeoCoord.h:284
static constexpr int MinLongitude
Definition GeoCoord.h:82
GeoCoord & operator=(const GeoCoord &other)=default
bool operator!=(const GeoCoord &other) const
Definition GeoCoord.h:279
void Set(double lat, double lon)
Definition GeoCoord.h:106
bool IsValid() const
Definition GeoCoord.h:205
std::ostream & operator<<(std::ostream &stream) const
Definition GeoCoord.h:134
Distance GetDistance(const GeoCoord &target) const
double GetLat() const
Definition GeoCoord.h:116
GeoCoord Add(const Bearing &bearing, const Distance &distance) const
double GetLon() const
Definition GeoCoord.h:124
static constexpr int MinLatitude
Definition GeoCoord.h:80
bool operator==(const GeoCoord &other) const
Definition GeoCoord.h:271
GeoCoord(const GeoCoord &other)=default
std::array< std::byte, 7 > GeoCoordBuffer
Definition GeoCoord.h:78
static constexpr int MaxLongitude
Definition GeoCoord.h:83
const GeoCoord target
Definition RouteStateAgent.h:50
Id GetHash() const
Definition GeoCoord.h:175
void EncodeToBuffer(GeoCoordBuffer &buffer) const
Definition GeoCoord.h:156
Vertex2D * buffer
Definition Transformation.h:343
bool IsEqual(const GeoCoord &other) const
Definition GeoCoord.h:197
static bool Parse(const std::string &text, GeoCoord &coord)
GeoCoord(double lat, double lon)
Definition GeoCoord.h:96
std::string GetDisplayText() const
const size_t coordByteSize
Definition GeoCoord.h:64
OSMSCOUT_API const double lonConversionFactor
uint64_t Id
Definition OSMScoutTypes.h:40
OSMSCOUT_API const double latConversionFactor
constexpr uint32_t maxRawCoordValue
Definition GeoCoord.h:58