Web Mercator (EPSG:3857 / Slippy Map) coordinate converter between WGS84 lat/lon and zoom-level pixels.
More...
|
| | GoogleProjection (int levels=18) |
| | Precompute Web Mercator projection lookup tables for zoom levels 0 through levels - 1.
|
| void | fromLLtoPixel (double &x, double &y, int zoom) |
| | Project WGS84 (longitude, latitude) in-place to global pixel coordinates (x, y) at zoom.
|
| void | fromPixelToLL (double &x, double &y, int zoom) |
| | Inverse-project global pixel coordinates (x, y) at zoom in-place to WGS84 (longitude, latitude).
|
Web Mercator (EPSG:3857 / Slippy Map) coordinate converter between WGS84 lat/lon and zoom-level pixels.
◆ GoogleProjection()
| GoogleProjection::GoogleProjection |
( |
int | levels = 18 | ) |
|
|
inline |
Precompute Web Mercator projection lookup tables for zoom levels 0 through levels - 1.
- Parameters
-
| levels | Number of zoom levels to allocate and precompute (default 18). |
◆ fromLLtoPixel()
| void GoogleProjection::fromLLtoPixel |
( |
double & | x, |
|
|
double & | y, |
|
|
int | zoom ) |
|
inline |
Project WGS84 (longitude, latitude) in-place to global pixel coordinates (x, y) at zoom.
- Parameters
-
| [in,out] | x | Input longitude in degrees; overwritten with rounded X pixel coordinate. |
| [in,out] | y | Input latitude in degrees; overwritten with rounded Y pixel coordinate. |
| [in] | zoom | Target Slippy Map zoom level (0 <= zoom < levels). |
◆ fromPixelToLL()
| void GoogleProjection::fromPixelToLL |
( |
double & | x, |
|
|
double & | y, |
|
|
int | zoom ) |
|
inline |
Inverse-project global pixel coordinates (x, y) at zoom in-place to WGS84 (longitude, latitude).
- Parameters
-
| [in,out] | x | Input X pixel coordinate; overwritten with longitude in degrees. |
| [in,out] | y | Input Y pixel coordinate; overwritten with latitude in degrees. |
| [in] | zoom | Source Slippy Map zoom level (0 <= zoom < levels). |
The documentation for this class was generated from the following file: