libosmscout
0.1
|
#include <TileId.h>
Public Member Functions | |
Pixel | AsPixel () const |
GeoBox | GetBoundingBox (const Magnification &magnification) const |
Return the bounding box of the given tile. More... | |
GeoBox | GetBoundingBox (const MagnificationLevel &level) const |
Return the bounding box of the given tile. More... | |
std::string | GetDisplayText () const |
Return a short human readable description of the tile id. More... | |
GeoCoord | GetTopLeftCoord (const Magnification &magnification) const |
Return the top left coordinate of the tile. More... | |
uint32_t | GetX () const |
Return the X coordinate fo the tile. More... | |
uint32_t | GetY () const |
Return the y coordinate fo the tile. More... | |
bool | operator!= (const TileId &other) const |
Compare tile ids for inequality. More... | |
bool | operator< (const TileId &other) const |
Compare tile ids by their order. More... | |
bool | operator== (const TileId &other) const |
Compare tile ids for equality. More... | |
TileId (uint32_t x, uint32_t y) | |
Ceate a new tile by passing magnification and tile coordinates. More... | |
Static Public Member Functions | |
static TileId | GetTile (const Magnification &magnification, const GeoCoord &coord) |
Return the libosmscout-specific tile id for the given magnification that contains the given coordinate. More... | |
static TileId | GetTile (const MagnificationLevel &level, const GeoCoord &coord) |
Return the libosmscout-specific tile id for the given magnification that contains the given coordinate. More... | |
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.
osmscout::TileId::TileId | ( | uint32_t | x, |
uint32_t | y | ||
) |
Ceate a new tile by passing magnification and tile coordinates.
|
inline |
Referenced by osmscout::RouteNodeDataFile::Get(), and osmscout::RouteNodeDataFile::GetTile().
GeoBox osmscout::TileId::GetBoundingBox | ( | const Magnification & | magnification | ) | const |
Return the bounding box of the given tile.
magnification | Magnification to complete the definition of the tile id (these are relative to a magnification) |
References osmscout::cellDimension, and osmscout::Magnification::GetLevel().
GeoBox osmscout::TileId::GetBoundingBox | ( | const MagnificationLevel & | level | ) | const |
Return the bounding box of the given tile.
magnification | Magnification to complete the definition of the tile id (these are relative to a magnification) |
References osmscout::cellDimension, and osmscout::MagnificationLevel::Get().
std::string osmscout::TileId::GetDisplayText | ( | ) | const |
Return a short human readable description of the tile id.
Referenced by osmscout::TileIdBox::GetDisplayText().
|
static |
Return the libosmscout-specific tile id for the given magnification that contains the given coordinate.
magnification | Magnification to use |
coord | Coordinate that should be covered by the tile |
References osmscout::cellDimension, osmscout::GeoCoord::GetLat(), osmscout::Magnification::GetLevel(), and osmscout::GeoCoord::GetLon().
Referenced by osmscout::ElevationService< DataLoader >::ElevationProfile(), osmscout::RouteNodeDataFile::Get(), osmscout::RouteNodeDataFile::GetTile(), osmscout::MapTileCache< T >::GetTilesForBoundingBox(), and osmscout::DataTileCache::GetTilesForBoundingBox().
|
static |
Return the libosmscout-specific tile id for the given magnification that contains the given coordinate.
level | Level to use (magnification.GetLevel()) |
coord | Coordinate that should be covered by the tile |
References osmscout::cellDimension, osmscout::MagnificationLevel::Get(), osmscout::GeoCoord::GetLat(), and osmscout::GeoCoord::GetLon().
GeoCoord osmscout::TileId::GetTopLeftCoord | ( | const Magnification & | magnification | ) | const |
Return the top left coordinate of the tile.
magnification | Magnification to complete the definition of the tile id (these are relative to a magnification) |
References osmscout::cellDimension, and osmscout::Magnification::GetLevel().
|
inline |
Return the X coordinate fo the tile.
Referenced by osmscout::TileIdBox::end(), osmscout::TileIdBox::GetBoundingBox(), osmscout::TileIdBox::GetCenter(), osmscout::TileIdBox::GetMaxX(), osmscout::TileIdBox::GetMinX(), osmscout::TileIdBox::GetWidth(), osmscout::TileIdBox::Include(), osmscout::TileIdBox::Intersection(), osmscout::TileIdBox::Intersects(), and osmscout::TileIdBoxConstIterator::operator++().
|
inline |
Return the y coordinate fo the tile.
Referenced by osmscout::TileIdBox::end(), osmscout::TileIdBox::GetBoundingBox(), osmscout::TileIdBox::GetCenter(), osmscout::TileIdBox::GetHeight(), osmscout::TileIdBox::GetMaxY(), osmscout::TileIdBox::GetMinY(), osmscout::TileIdBox::Include(), osmscout::TileIdBox::Intersection(), osmscout::TileIdBox::Intersects(), and osmscout::TileIdBoxConstIterator::operator++().
|
inline |
Compare tile ids for inequality.
|
inline |
Compare tile ids by their order.
Needed for sorting tile ids and placing them into (some) containers.
|
inline |
Compare tile ids for equality.