Libosmium 2.22.0 Fast and flexible C++ library for working with OpenStreetMap data

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
osmium::geom::Tile Struct Reference

`#include <tile.hpp>`

## Public Types
enum | { max_zoom = 30U }

## Public Member Functions
| Tile (uint32_t zoom, uint32_t tx, uint32_t ty) noexcept
| Tile (uint32_t zoom, const osmium::Location &location)
| Tile (uint32_t zoom, const osmium::geom::Coordinates &coordinates)
bool | valid () const noexcept

## Public Attributes
uint32_t | x
| x coordinate
uint32_t | y
| y coordinate
uint32_t | z
| Zoom level.

## Detailed Description

A tile in the usual Mercator projection.

## Member Enumeration Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
max_zoom |

## Constructor & Destructor Documentation

## ◆ Tile() [1/3]

osmium::geom::Tile::Tile | ( | uint32_t | zoom,
|  | uint32_t | tx,
|  | uint32_t | ty )
| inline explicit noexcept

Create a tile with the given zoom level and x and y tile coordinates.

The values are not checked for validity.

Precondition
  zoom <= 30 && x < 2^zoom && y < 2^zoom
  osmium::geom::Tile::x
  uint32_t x
  x coordinate
  Definition tile.hpp:108
  osmium::geom::Tile::y
  uint32_t y
  y coordinate
  Definition tile.hpp:111

## ◆ Tile() [2/3]

osmium::geom::Tile::Tile | ( | uint32_t | zoom,
|  | const osmium::Location & | location )
| inline explicit

Create a tile with the given zoom level that contains the given location.

The values are not checked for validity.

Precondition
  location.valid() && zoom <= 30

## ◆ Tile() [3/3]

osmium::geom::Tile::Tile | ( | uint32_t | zoom,
|  | const osmium::geom::Coordinates & | coordinates )
| inline explicit

Create a tile with the given zoom level that contains the given coordinates in Mercator projection.

The values are not checked for validity.

Precondition
  coordinates.valid() && zoom <= 30

## Member Function Documentation

## ◆ valid()

bool osmium::geom::Tile::valid | ( |  | ) | const
| inline noexcept

Check whether this tile is valid. For a tile to be valid the zoom level must be between 0 and 30 and the coordinates must each be between 0 and 2^zoom-1.

## Member Data Documentation

## ◆ x

uint32_t osmium::geom::Tile::x

x coordinate

## ◆ y

uint32_t osmium::geom::Tile::y

y coordinate

## ◆ z

uint32_t osmium::geom::Tile::z

Zoom level.

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

- include/osmium/geom/tile.hpp