1#ifndef OSMIUM_GEOM_TILE_HPP
2#define OSMIUM_GEOM_TILE_HPP
50 inline constexpr const T& clamp(
const T& value,
const T& min,
const T& max) {
51 return value < min ? min : (max < value ? max : value);
78 return static_cast<uint32_t
>(detail::clamp<int32_t>(
89 return static_cast<uint32_t
>(detail::clamp<int32_t>(
120 explicit Tile(uint32_t zoom, uint32_t tx, uint32_t ty) noexcept :
140 assert(location.
valid());
171 return x < max &&
y < max;
178 return lhs.z == rhs.z && lhs.x == rhs.x && lhs.y == rhs.y;
182 return !(lhs == rhs);
201 return lhs.y < rhs.y;
Definition: location.hpp:271
constexpr bool valid() const noexcept
Definition: location.hpp:352
bool operator!=(const Coordinates &lhs, const Coordinates &rhs) noexcept
Definition: coordinates.hpp:149
constexpr uint32_t mercx_to_tilex(uint32_t zoom, double x) noexcept
Definition: tile.hpp:77
Coordinates lonlat_to_mercator(const Coordinates &c)
Definition: mercator_projection.hpp:123
constexpr double tile_extent_in_zoom(uint32_t zoom) noexcept
Definition: tile.hpp:68
bool operator==(const Coordinates &lhs, const Coordinates &rhs) noexcept
Definition: coordinates.hpp:139
bool operator<(const Tile &lhs, const Tile &rhs) noexcept
Definition: tile.hpp:188
constexpr uint32_t num_tiles_in_zoom(uint32_t zoom) noexcept
Definition: tile.hpp:60
constexpr uint32_t mercy_to_tiley(uint32_t zoom, double y) noexcept
Definition: tile.hpp:88
Namespace for everything in the Osmium library.
Definition: assembler.hpp:53
Definition: coordinates.hpp:48
double y
Definition: coordinates.hpp:51
double x
Definition: coordinates.hpp:50
uint32_t x
x coordinate
Definition: tile.hpp:104
uint32_t z
Zoom level.
Definition: tile.hpp:110
Tile(uint32_t zoom, const osmium::geom::Coordinates &coordinates)
Definition: tile.hpp:154
Tile(uint32_t zoom, const osmium::Location &location)
Definition: tile.hpp:137
uint32_t y
y coordinate
Definition: tile.hpp:107
@ max_zoom
Definition: tile.hpp:100
Tile(uint32_t zoom, uint32_t tx, uint32_t ty) noexcept
Definition: tile.hpp:120
bool valid() const noexcept
Definition: tile.hpp:166