alaCarte Maps
Renderer for OpenStreetMap tiles
|
Go to the source code of this file.
Macros | |
#define | TRANSFORM_HPP |
This file is part of alaCarte. More... | |
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... | |
void | rot (uint32_t n, FixedPoint &p, bool rx, bool ry) |
uint64_t | xy2hilbert (FixedPoint p) |
#define TRANSFORM_HPP |
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 23 of file transform.hpp.
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.
void rot | ( | uint32_t | n, |
FixedPoint & | p, | ||
bool | rx, | ||
bool | ry | ||
) |
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.