libosmscout  0.1
osmscout::OSMTileId Class Referencefinal

#include <Tiling.h>

Public Member Functions

GeoBox GetBoundingBox (const Magnification &magnification) const
 Return the bounding box of the given tile. More...
 
std::string GetDisplayText () const
 
GeoCoord GetTopLeftCoord (const Magnification &magnification) const
 Return the top left coordinate of the tile. More...
 
uint32_t GetX () const
 
uint32_t GetY () const
 
bool operator!= (const OSMTileId &other) const
 
bool operator== (const OSMTileId &other) const
 
 OSMTileId (uint32_t x, uint32_t y)
 

Static Public Member Functions

static OSMTileId GetOSMTile (const Magnification &magnification, const GeoCoord &coord)
 

Detailed Description

Representation of the x and y coordinate of a OSM tile.

Note
that OSM tile coordinates are only unique in content fo the zoom level of the tile. Because in most cases the zoom level beeing redundant we have defined OSMTile without the zoom level to save in memory space.

Constructor & Destructor Documentation

◆ OSMTileId()

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

Referenced by GetBoundingBox().

Member Function Documentation

◆ GetBoundingBox()

GeoBox osmscout::OSMTileId::GetBoundingBox ( const Magnification magnification) const

Return the bounding box of the given tile.

Parameters
magnificationMagnification to complete the definition of the tile id (these are relative to a magnification)
Returns
The GeoBox defining the resulting area

References GetTopLeftCoord(), and OSMTileId().

Referenced by osmscout::TileProjection::Set().

◆ GetDisplayText()

std::string osmscout::OSMTileId::GetDisplayText ( ) const
inline

◆ GetOSMTile()

OSMTileId osmscout::OSMTileId::GetOSMTile ( const Magnification magnification,
const GeoCoord coord 
)
static

◆ GetTopLeftCoord()

GeoCoord osmscout::OSMTileId::GetTopLeftCoord ( const Magnification magnification) const

Return the top left coordinate of the tile.

Parameters
magnificationMagnification to complete the definition of the tile id (these are relative to a magnification)
Returns
The resuting coordinate

References osmscout::Magnification::GetMagnification(), and n.

Referenced by GetBoundingBox(), and osmscout::OSMTileIdBox::GetBoundingBox().

◆ GetX()

◆ GetY()

◆ operator!=()

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

◆ operator==()

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

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