alaCarte Maps
Renderer for OpenStreetMap tiles
|
Go to the source code of this file.
Macros | |
#define | NORM (FACTOR * RADIUS/2.0) |
This file is part of alaCarte. More... | |
#define | RADIUS 6378137.0 |
#define | FACTOR 100.0 |
Functions | |
void | tileToMercator (int tx, int ty, int zoom, coord_t &x, coord_t &y) |
converts tile coordinates to north-west corner of the tile in the Mercator projection. More... | |
void | mercatorToTile (coord_t x, coord_t y, int zoom, int &tx, int &ty) |
converts mercator coordinates to the coords of the tile they are contained in. More... | |
void | projectMercator (const FloatPoint &p, coord_t &x, coord_t &y) |
converts cooridinates in lat/lon (WGS84) to spherical Mercator (EPSG:3857). More... | |
void | inverseMercator (const FixedPoint &p, double &lat, double &lon) |
converts cooridinates in lat/lon (WGS84) to spherical Mercator (EPSG:3857). More... | |
uint64_t | spreadBits32 (uint32_t y) |
uint64_t | interleave64 (uint32_t x, uint32_t y) |
uint64_t | xy2hilbert (FixedPoint p) |
#define FACTOR 100.0 |
Definition at line 41 of file transform.cpp.
This file is part of alaCarte.
alaCarte is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
alaCarte is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with alaCarte. If not, see http://www.gnu.org/licenses/.
Copyright alaCarte 2012-2013 Simon Dreher, Florian Jacob, Tobias Kahlert, Patrick Niklaus, Bernhard Scheirle, Lisa Winter Maintainer: Patrick Niklaus
Definition at line 37 of file transform.cpp.
#define RADIUS 6378137.0 |
Definition at line 39 of file transform.cpp.
uint64_t interleave64 | ( | uint32_t | x, |
uint32_t | y | ||
) |
Definition at line 132 of file transform.cpp.
void inverseMercator | ( | const FixedPoint & | p, |
double & | lat, | ||
double & | lon | ||
) |
converts cooridinates in lat/lon (WGS84) to spherical Mercator (EPSG:3857).
p | point in Mercator coordinates. |
lat | reference to store lat coords. |
lon | reference to store lon coords. |
Definition at line 102 of file transform.cpp.
converts mercator coordinates to the coords of the tile they are contained in.
x | coordinate in the Mercator projection. |
y | coordinate in the Mercator projection. |
zoom | zoomlevel of the tile |
tx | reference to store the x coordinate of the tile |
ty | reference to store the y coordinate of the tile |
Definition at line 73 of file transform.cpp.
void projectMercator | ( | const FloatPoint & | p, |
coord_t & | x, | ||
coord_t & | y | ||
) |
converts cooridinates in lat/lon (WGS84) to spherical Mercator (EPSG:3857).
p | point in lat/lon coordinates. |
x | reference to store x coords. |
y | reference to store y coords. |
Definition at line 87 of file transform.cpp.
uint64_t spreadBits32 | ( | uint32_t | y | ) |
Definition at line 108 of file transform.cpp.
converts tile coordinates to north-west corner of the tile in the Mercator projection.
tx | x coordinate of the tile |
ty | y coordinate of the tile |
zoom | zoomlevel of the tile |
x | reference to store x coords. |
y | reference to store y coords. |
Definition at line 52 of file transform.cpp.
uint64_t xy2hilbert | ( | FixedPoint | p | ) |
Definition at line 137 of file transform.cpp.