GeoDesk for C++
Fast and storage-efficient spatial database engine for OpenStreetMap features
Loading...
Searching...
No Matches
geodesk::Coordinate Class Reference

A pair of Cartesian coordinate values. More...

#include <Coordinate.h>

Public Member Functions

constexpr Coordinate (int32_t x_, int32_t y_)
 
 Coordinate (double x_, double y_)
 
constexpr Coordinate ()
 
double lon () const noexcept
 
double lat () const noexcept
 
bool isNull () const noexcept
 
bool operator== (const Coordinate &other) const noexcept
 
 operator int64_t () const noexcept
 

Static Public Member Functions

static Coordinate ofLonLat (double lon, double lat)
 Creates a Coordinate with the given longitude and latitude.
 
static Coordinate ofLatLon (double lat, double lon)
 Creates a Coordinate with the given latitude and longitude.
 

Public Attributes

int32_t x
 
int32_t y
 

Detailed Description

A pair of Cartesian coordinate values.

Constructor & Destructor Documentation

◆ Coordinate() [1/3]

geodesk::Coordinate::Coordinate ( int32_t x_,
int32_t y_ )
inlineconstexpr

◆ Coordinate() [2/3]

geodesk::Coordinate::Coordinate ( double x_,
double y_ )
inline

◆ Coordinate() [3/3]

geodesk::Coordinate::Coordinate ( )
inlineconstexpr

Member Function Documentation

◆ isNull()

bool geodesk::Coordinate::isNull ( ) const
inlinenoexcept

◆ lat()

double geodesk::Coordinate::lat ( ) const
inlinenoexcept

◆ lon()

double geodesk::Coordinate::lon ( ) const
inlinenoexcept

◆ ofLatLon()

static Coordinate geodesk::Coordinate::ofLatLon ( double lat,
double lon )
inlinestatic

Creates a Coordinate with the given latitude and longitude.

◆ ofLonLat()

static Coordinate geodesk::Coordinate::ofLonLat ( double lon,
double lat )
inlinestatic

Creates a Coordinate with the given longitude and latitude.

◆ operator int64_t()

geodesk::Coordinate::operator int64_t ( ) const
inlineexplicitnoexcept

◆ operator==()

bool geodesk::Coordinate::operator== ( const Coordinate & other) const
inlinenoexcept

Member Data Documentation

◆ x

int32_t geodesk::Coordinate::x

◆ y

int32_t geodesk::Coordinate::y

The documentation for this class was generated from the following file: