Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
pangea_survey::XyzTiles Class Reference

Convert Web-Mercator geographic coordinates to canonical XYZ addresses. More...

#include <xyz_tiles.h>

Static Public Member Functions

static double dimension (int zoom)
 Number of tiles across one axis at this zoom level.
static double metresPerPixel (int zoom)
 Equatorial Web-Mercator metres per pixel at this zoom.
static double groundPixel (int zoom, double latitude)
 Ground metres per pixel at a latitude after Mercator scale correction.
static std::pair< double, double > tileCoordinate (double latitude, double longitude, int zoom)
 Convert WGS-84 latitude/longitude to fractional tile coordinates.
static std::pair< double, double > geographic (double x, double y, int zoom)
 Convert fractional tile coordinates back to latitude/longitude.
static std::pair< double, double > pixel (std::uint64_t x, std::uint64_t y, int zoom)
 Return the geographic centre of one global pixel address.
static std::filesystem::path path (const std::filesystem::path &root, int zoom, std::uint32_t x, std::uint32_t y)
 Build the canonical zoom/x/y.jpeg path after range validation.

Static Public Attributes

static constexpr int tileSize = 256
static constexpr double radius = 6378137
static constexpr double radians = 0.01745329251994329577
static constexpr double latitudeLimit = 85.0511287798066

Detailed Description

Convert Web-Mercator geographic coordinates to canonical XYZ addresses.

Tile pixels use a 256-pixel extent and paths are zoom/x/y.jpeg; the output is an ordinary interoperable XYZ tile pyramid.

Definition at line 55 of file xyz_tiles.h.

Member Function Documentation

◆ dimension()

double pangea_survey::XyzTiles::dimension ( int zoom)
inlinestatic

Number of tiles across one axis at this zoom level.

Definition at line 62 of file xyz_tiles.h.

◆ geographic()

std::pair< double, double > pangea_survey::XyzTiles::geographic ( double x,
double y,
int zoom )
inlinestatic

Convert fractional tile coordinates back to latitude/longitude.

Definition at line 92 of file xyz_tiles.h.

◆ groundPixel()

double pangea_survey::XyzTiles::groundPixel ( int zoom,
double latitude )
inlinestatic

Ground metres per pixel at a latitude after Mercator scale correction.

Definition at line 71 of file xyz_tiles.h.

◆ metresPerPixel()

double pangea_survey::XyzTiles::metresPerPixel ( int zoom)
inlinestatic

Equatorial Web-Mercator metres per pixel at this zoom.

Definition at line 67 of file xyz_tiles.h.

◆ path()

std::filesystem::path pangea_survey::XyzTiles::path ( const std::filesystem::path & root,
int zoom,
std::uint32_t x,
std::uint32_t y )
inlinestatic

Build the canonical zoom/x/y.jpeg path after range validation.

Definition at line 105 of file xyz_tiles.h.

◆ pixel()

std::pair< double, double > pangea_survey::XyzTiles::pixel ( std::uint64_t x,
std::uint64_t y,
int zoom )
inlinestatic

Return the geographic centre of one global pixel address.

Definition at line 100 of file xyz_tiles.h.

◆ tileCoordinate()

std::pair< double, double > pangea_survey::XyzTiles::tileCoordinate ( double latitude,
double longitude,
int zoom )
inlinestatic

Convert WGS-84 latitude/longitude to fractional tile coordinates.

Parameters
[in]latitudeLatitude in degrees within Web-Mercator limits.
[in]longitudeLongitude in degrees.
[in]zoomXYZ zoom level from 0 through 22.
Returns
Fractional tile x and y, with y increasing southward.

Definition at line 83 of file xyz_tiles.h.

Field Documentation

◆ latitudeLimit

double pangea_survey::XyzTiles::latitudeLimit = 85.0511287798066
staticconstexpr

Definition at line 60 of file xyz_tiles.h.

◆ radians

double pangea_survey::XyzTiles::radians = 0.01745329251994329577
staticconstexpr

Definition at line 59 of file xyz_tiles.h.

◆ radius

double pangea_survey::XyzTiles::radius = 6378137
staticconstexpr

Definition at line 58 of file xyz_tiles.h.

◆ tileSize

int pangea_survey::XyzTiles::tileSize = 256
staticconstexpr

Definition at line 57 of file xyz_tiles.h.


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