olp-cpp-sdk  1.22.0
Static Public Member Functions | List of all members
olp::geo::TileKeyUtils Class Reference

Used to get geographic coordinates from tile keys and vise versa. More...

#include <TileKeyUtils.h>

Static Public Member Functions

static TileKey GeoCoordinatesToTileKey (const ITilingScheme &tiling_scheme, const GeoCoordinates &geo_point, const std::uint32_t level)
 Gets the key of the tile that contains geographic coordinates. More...
 
static std::vector< TileKeyGeoRectangleToTileKeys (const ITilingScheme &tiling_scheme, const GeoRectangle &geo_rectangle, const std::uint32_t level)
 Gets the keys of the tile that overlaps with a geographic rectangle. More...
 
static TileKey GetRelativeSubTileKey (const geo::TileKey &key, std::uint32_t parent_level)
 Gets the tile key that is a relative of a given parent. More...
 
static TileKey GetAbsoluteSubTileKey (const TileKey &parent, const TileKey &sub_tile)
 Merges the given parent tile key and the child tile key into an absolute tile key. More...
 

Detailed Description

Used to get geographic coordinates from tile keys and vise versa.

Member Function Documentation

◆ GeoCoordinatesToTileKey()

static TileKey olp::geo::TileKeyUtils::GeoCoordinatesToTileKey ( const ITilingScheme tiling_scheme,
const GeoCoordinates geo_point,
const std::uint32_t  level 
)
static

Gets the key of the tile that contains geographic coordinates.

Parameters
[in]tiling_schemeThe tiling scheme.
[in]geo_pointThe geographic coordinates for which you want to find the container tile key.
[in]levelThe level of the tile.
Returns
The key of the tile that contains the geographic coordinates. If the tile cannot be calculated, an invalid tile is returned.

◆ GeoRectangleToTileKeys()

static std::vector<TileKey> olp::geo::TileKeyUtils::GeoRectangleToTileKeys ( const ITilingScheme tiling_scheme,
const GeoRectangle geo_rectangle,
const std::uint32_t  level 
)
static

Gets the keys of the tile that overlaps with a geographic rectangle.

Parameters
[in]tiling_schemeThe tiling scheme.
[in]geo_rectangleThe rectangle for which to find overlapping tile keys.
[in]levelThe level of the tile key.
Returns
The keys of the tile at the specified level overlapping with the provided geographic rectangle. If the tile cannot be calculated, an empty container is returned.

◆ GetAbsoluteSubTileKey()

static TileKey olp::geo::TileKeyUtils::GetAbsoluteSubTileKey ( const TileKey parent,
const TileKey sub_tile 
)
static

Merges the given parent tile key and the child tile key into an absolute tile key.

Parameters
parentThe parent tile key.
sub_tileThe child tile key.
Returns
The absolute tile key.

◆ GetRelativeSubTileKey()

static TileKey olp::geo::TileKeyUtils::GetRelativeSubTileKey ( const geo::TileKey key,
std::uint32_t  parent_level 
)
static

Gets the tile key that is a relative of a given parent.

Parameters
keyThe tile key to convert to.
parent_levelThe level of the parent tile. It is expected to be less than or equal to key.Level().
Returns
The tile key a relative of the parent level.

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