libosmscout  1.1.1
Public Member Functions | Static Public Member Functions | List of all members
osmscout::TileId Class Reference

#include <libosmscout/include/osmscout/util/TileId.h>

Public Member Functions

 TileId (uint32_t x, uint32_t y)
 
uint32_t GetX () const
 
uint32_t GetY () const
 
Pixel AsPixel () const
 
std::string GetDisplayText () const
 
bool operator== (const TileId &other) const
 
bool operator!= (const TileId &other) const
 
bool operator< (const TileId &other) const
 
GeoCoord GetTopLeftCoord (const Magnification &magnification) const
 
GeoBox GetBoundingBox (const MagnificationLevel &level) const
 
GeoBox GetBoundingBox (const Magnification &magnification) const
 

Static Public Member Functions

static TileId GetTile (const Magnification &magnification, const GeoCoord &coord)
 
static TileId GetTile (const MagnificationLevel &level, const GeoCoord &coord)
 

Detailed Description

A Tile id, uniquely identifing a tile by its level and (unique for the given level) tile coordinates.

Note that this are libosmscout tiles, that evenly split the whole world into - for each level - equaly sized (regarding their latitude and longitude interval) rectangles.

Classic OSM tiles are calculated differently.

Constructor & Destructor Documentation

◆ TileId()

osmscout::TileId::TileId ( uint32_t  x,
uint32_t  y 
)

Member Function Documentation

◆ AsPixel()

Pixel osmscout::TileId::AsPixel ( ) const
inline

◆ GetBoundingBox() [1/2]

GeoBox osmscout::TileId::GetBoundingBox ( const MagnificationLevel &  level) const

◆ GetBoundingBox() [2/2]

GeoBox osmscout::TileId::GetBoundingBox ( const Magnification &  magnification) const

◆ GetDisplayText()

std::string osmscout::TileId::GetDisplayText ( ) const

◆ GetTile() [1/2]

static TileId osmscout::TileId::GetTile ( const Magnification &  magnification,
const GeoCoord &  coord 
)
static

◆ GetTile() [2/2]

static TileId osmscout::TileId::GetTile ( const MagnificationLevel &  level,
const GeoCoord &  coord 
)
static

◆ GetTopLeftCoord()

GeoCoord osmscout::TileId::GetTopLeftCoord ( const Magnification &  magnification) const

◆ GetX()

uint32_t osmscout::TileId::GetX ( ) const
inline

Return the X coordinate fo the tile

◆ GetY()

uint32_t osmscout::TileId::GetY ( ) const
inline

Return the y coordinate fo the tile

◆ operator!=()

bool osmscout::TileId::operator!= ( const TileId other) const
inline

Compare tile ids for inequality

◆ operator<()

bool osmscout::TileId::operator< ( const TileId other) const
inline

Compare tile ids by their order. Needed for sorting tile ids and placing them into (some) containers.

◆ operator==()

bool osmscout::TileId::operator== ( const TileId other) const
inline

Compare tile ids for equality


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