alaCarte Maps
Renderer for OpenStreetMap tiles
|
A TileIdentifier identifies a Tile. More...
#include <tile_identifier.hpp>
Public Types | |
enum | Format { PNG, SVG, enumSize } |
Enumeration which contains all supported image formats. More... | |
Public Member Functions | |
TileIdentifier (int x, int y, int zoom, string styleSheetpath, Format imageFormat) | |
Constructs a new TileIdentifier with the given parameters. More... | |
TESTABLE int | getX () const |
Returns the x coordinate of the Tile. More... | |
TESTABLE int | getY () const |
Returns the y coordinate of the Tile. More... | |
TESTABLE int | getZoom () const |
Returns the zoom level of the Tile. More... | |
TESTABLE Format | getImageFormat () const |
Returns the image Format of the Tile. More... | |
TESTABLE const string & | getImageFormatString () const |
Returns the image Format of the Tile. More... | |
TESTABLE const string & | getStylesheetPath () const |
Returns the path to the Stylesheet which should be used for rendering. More... | |
TESTABLE bool | isDefaultIdentifier () const |
Determine whether this is the Identifier for the default tile. More... | |
TESTABLE bool | isNoneDataIdentifier () const |
Static Public Member Functions | |
static shared_ptr< TileIdentifier > | Create (const string &url, shared_ptr< StylesheetManager > StylesheetManager, const shared_ptr< Configuration > &config) |
Constructs a new TileIdentifier with the given url. More... | |
static shared_ptr< TileIdentifier > | CreateEmptyTID (const string &stylesheetPath, TileIdentifier::Format format) |
Return the TileIdentifier used for Tiles without data. More... | |
static int | stringToInt (const char *c) |
Converts the given char* to integer. More... | |
Protected Attributes | |
int | x |
x coordinate of the Tile. More... | |
int | y |
y coordinate of the Tile. More... | |
int | zoom |
zoom level of the Tile. More... | |
string | styleSheetpath |
path to the Stylesheet which should be used for rendering. More... | |
Format | imageFormat |
Format of the image. More... | |
Static Private Attributes | |
static const string | FormatString [enumSize] |
This file is part of alaCarte. More... | |
A TileIdentifier identifies a Tile.
Definition at line 33 of file tile_identifier.hpp.
Enumeration which contains all supported image formats.
Enumerator | |
---|---|
PNG | |
SVG | |
enumSize |
Definition at line 39 of file tile_identifier.hpp.
TileIdentifier::TileIdentifier | ( | int | x, |
int | y, | ||
int | zoom, | ||
string | styleSheetpath, | ||
Format | imageFormat | ||
) |
Constructs a new TileIdentifier with the given parameters.
x | The x coordinate of the Tile. |
y | The y coordinate of the Tile. |
zoom | The zoom level of the Tile. |
styleSheetpath | The path to the Stylesheet, which should be used for rendering this Tile. (With preceeding slash). |
imageFormat | The image Format of the rendered Tile. |
Definition at line 166 of file tile_identifier.cpp.
|
static |
Constructs a new TileIdentifier with the given url.
url | The url which should be parsed. |
StylesheetManager | used to validate the stylsheet parameter |
MalformedURLException | if some part of the url isn't parseable. |
Definition at line 72 of file tile_identifier.cpp.
|
static |
Return the TileIdentifier used for Tiles without data.
Definition at line 152 of file tile_identifier.cpp.
TileIdentifier::Format TileIdentifier::getImageFormat | ( | ) | const |
Returns the image Format of the Tile.
Definition at line 211 of file tile_identifier.cpp.
const string & TileIdentifier::getImageFormatString | ( | ) | const |
Returns the image Format of the Tile.
Definition at line 221 of file tile_identifier.cpp.
const string & TileIdentifier::getStylesheetPath | ( | ) | const |
Returns the path to the Stylesheet which should be used for rendering.
Definition at line 232 of file tile_identifier.cpp.
int TileIdentifier::getX | ( | ) | const |
Returns the x coordinate of the Tile.
Definition at line 181 of file tile_identifier.cpp.
int TileIdentifier::getY | ( | ) | const |
Returns the y coordinate of the Tile.
Definition at line 191 of file tile_identifier.cpp.
int TileIdentifier::getZoom | ( | ) | const |
Returns the zoom level of the Tile.
Definition at line 201 of file tile_identifier.cpp.
bool TileIdentifier::isDefaultIdentifier | ( | ) | const |
Determine whether this is the Identifier for the default tile.
Definition at line 242 of file tile_identifier.cpp.
bool TileIdentifier::isNoneDataIdentifier | ( | ) | const |
Definition at line 247 of file tile_identifier.cpp.
|
static |
Converts the given char* to integer.
p | Char pointer |
MalformedURLException | if no convertable string given. |
Definition at line 44 of file tile_identifier.cpp.
|
staticprivate |
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: Simon Dreher
Definition at line 49 of file tile_identifier.hpp.
|
protected |
Format of the image.
Definition at line 78 of file tile_identifier.hpp.
|
protected |
path to the Stylesheet which should be used for rendering.
Definition at line 76 of file tile_identifier.hpp.
|
protected |
x coordinate of the Tile.
Definition at line 70 of file tile_identifier.hpp.
|
protected |
y coordinate of the Tile.
Definition at line 72 of file tile_identifier.hpp.
|
protected |
zoom level of the Tile.
Definition at line 74 of file tile_identifier.hpp.