boat
C++23 geospatial library
Loading...
Searching...
No Matches
boat::tile Struct Reference

#include <tile.hpp>

Public Member Functions

std::tuple< int, int, int, int > rect (int width, int height) const
 Clipped raster-pixel rectangle {x, y, width, height}.
auto affine (int width, int height) const
 Maps tile pixels to raster pixels.

Static Public Member Functions

static int zmax (int width, int height)
 Finest zoom, with one raster pixel per tile pixel.
static int zoom (int width, int height, double scale)
static int scale (int width, int height, int zoom)
 Raster pixels per tile pixel.
static std::generator< tile > all (int width, int height, int zoom)

Public Attributes

int z
int y
int x

Static Public Attributes

static constexpr int size = 256
 Maximum tile side in pixels.

Friends

auto operator<=> (tile const &, tile const &)=default
auto hash_value (tile const &v)

Member Function Documentation

◆ affine()

auto boat::tile::affine ( int width,
int height ) const
inline

Maps tile pixels to raster pixels.

◆ all()

std::generator< tile > boat::tile::all ( int width,
int height,
int zoom )
inlinestatic

◆ rect()

std::tuple< int, int, int, int > boat::tile::rect ( int width,
int height ) const
inline

Clipped raster-pixel rectangle {x, y, width, height}.

◆ scale()

int boat::tile::scale ( int width,
int height,
int zoom )
inlinestatic

Raster pixels per tile pixel.

◆ zmax()

int boat::tile::zmax ( int width,
int height )
inlinestatic

Finest zoom, with one raster pixel per tile pixel.

◆ zoom()

int boat::tile::zoom ( int width,
int height,
double scale )
inlinestatic

◆ hash_value

auto hash_value ( tile const & v)
friend

◆ operator<=>

auto operator<=> ( tile const & ,
tile const &  )
friend

Member Data Documentation

◆ size

int boat::tile::size = 256
staticconstexpr

Maximum tile side in pixels.

◆ x

int boat::tile::x

◆ y

int boat::tile::y

◆ z

int boat::tile::z

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