Updated tests cases matching the new tabs
[situare] / src / map / osm.h
1 /*
2     Situare - A location system for Facebook
3     Copyright (C) 2010  Ixonos Plc. Authors:
4
5         Sami Rämö - sami.ramo@ixonos.com
6
7     Situare is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License
9     version 2 as published by the Free Software Foundation.
10
11     Situare is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with Situare; if not, write to the Free Software
18     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
19     USA.
20 */
21
22
23 #ifndef OSM_H
24 #define OSM_H
25
26 // ZOOM LEVELS
27 const int OSM_MIN_ZOOM_LEVEL = 0;   ///< Minimum zoom level
28 const int OSM_MAX_ZOOM_LEVEL = 18;  ///< Maximum zoom level
29
30 // TILES
31 const int OSM_TILE_SIZE_X = 256;                            ///< Tile image size in x direction
32 const int OSM_TILE_SIZE_Y = 256;                            ///< Tile image size in y direction
33 const int OSM_TILES_PER_SIDE = (1 << OSM_MAX_ZOOM_LEVEL);   ///< Amount of tiles per side
34
35 // LATITUDE COORDINATE LIMITS
36 /**
37 * @var OSM_MAX_LATITUDE
38 * @brief Maximum latitude value ( = arctan(sinh(pi))
39 */
40 const double OSM_MAX_LATITUDE = 85.05112877980659237802;
41
42 // MAP PIXELS
43 /**
44 * @var OSM_MAP_PIXELS_X
45 * @brief Amount of horizontal pixels in map
46 */
47 const int OSM_MAP_PIXELS_X = OSM_TILES_PER_SIDE * OSM_TILE_SIZE_X;
48
49 const int OSM_MAP_MIN_PIXEL_X = 0;                ///< First map horizontal pixel index
50 const int OSM_MAP_MIN_PIXEL_Y = 0;                ///< First map vertical pixel index
51
52 const int OSM_MAP_MAX_PIXEL_X = OSM_MAP_PIXELS_X - 1; ///< Last map horizontal pixel index
53 /**
54 * @var OSM_MAP_MAX_PIXEL_Y
55 * @brief Last map vertical pixel index
56 */
57 const int OSM_MAP_MAX_PIXEL_Y = OSM_TILES_PER_SIDE * OSM_TILE_SIZE_Y - 1;
58
59 #endif // OSM_H