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()
|
inlinestatic |
Number of tiles across one axis at this zoom level.
Definition at line 62 of file xyz_tiles.h.
◆ geographic()
|
inlinestatic |
Convert fractional tile coordinates back to latitude/longitude.
Definition at line 92 of file xyz_tiles.h.
◆ groundPixel()
|
inlinestatic |
Ground metres per pixel at a latitude after Mercator scale correction.
Definition at line 71 of file xyz_tiles.h.
◆ metresPerPixel()
|
inlinestatic |
Equatorial Web-Mercator metres per pixel at this zoom.
Definition at line 67 of file xyz_tiles.h.
◆ path()
|
inlinestatic |
Build the canonical zoom/x/y.jpeg path after range validation.
Definition at line 105 of file xyz_tiles.h.
◆ pixel()
|
inlinestatic |
Return the geographic centre of one global pixel address.
Definition at line 100 of file xyz_tiles.h.
◆ tileCoordinate()
|
inlinestatic |
Convert WGS-84 latitude/longitude to fractional tile coordinates.
- Parameters
-
[in] latitude Latitude in degrees within Web-Mercator limits. [in] longitude Longitude in degrees. [in] zoom XYZ 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
|
staticconstexpr |
Definition at line 60 of file xyz_tiles.h.
◆ radians
|
staticconstexpr |
Definition at line 59 of file xyz_tiles.h.
◆ radius
|
staticconstexpr |
Definition at line 58 of file xyz_tiles.h.
◆ tileSize
|
staticconstexpr |
Definition at line 57 of file xyz_tiles.h.
The documentation for this class was generated from the following file:
- modules/pangea/xyz_tiles.h