Public Member Functions
osmdb::DisplayDB Class Reference

Class that allows for drawing of data from database. More...

#include <DisplayDB.h>

Inheritance diagram for osmdb::DisplayDB:
display::DisplayProvider

Public Member Functions

 DisplayDB (OsmDatabase &db, std::string const &path_base, int min_zoom, int max_zoom)
 Constructs a DisplayDB.
virtual ~DisplayDB ()
std::vector< std::unique_ptr
< display::DisplayElement >
> const & 
get_display_elements ()
OsmDatabaseget_db ()
void set_bounds (geo::Point const &topleft, geo::Point const &bottomright, int zoom)
 Change current view to position bounded by topleft and bottomright using zoomlevel zoom.
std::vector< std::unique_ptr
< osm::Element > > 
get_selected (geo::Point const &topleft, geo::Point const &bottomright, int zoom)
 Retrieve osm::Elements in box specified by topleft and bottomright when current zoom level is zoom.
double center_lat ()
double center_lon ()

Detailed Description

Class that allows for drawing of data from database.

Uses xml files to specify what to draw.

Definition at line 23 of file DisplayDB.h.


Constructor & Destructor Documentation

osmdb::DisplayDB::DisplayDB ( OsmDatabase db,
std::string const &  path_base,
int  min_zoom,
int  max_zoom 
)

Constructs a DisplayDB.

Parameters:
dbunderlying OsmDatabase
path_basepath to xml files specifying what to draw, this should be a directory containing files <min_zoom>.xml to <max_zoom>.xml
min_zoomminimum zoom level to draw
max_zoommaximum zoom level to draw

Definition at line 15 of file DisplayDB.cpp.

osmdb::DisplayDB::~DisplayDB ( ) [virtual]

Definition at line 36 of file DisplayDB.cpp.


Member Function Documentation

double osmdb::DisplayDB::center_lat ( ) [virtual]
Returns:
center latitude of all data this DisplayProvider can get

Implements display::DisplayProvider.

Definition at line 92 of file DisplayDB.cpp.

double osmdb::DisplayDB::center_lon ( ) [virtual]
Returns:
center longitude of all data this DisplayProvider can get

Implements display::DisplayProvider.

Definition at line 97 of file DisplayDB.cpp.

OsmDatabase & osmdb::DisplayDB::get_db ( )

Definition at line 40 of file DisplayDB.cpp.

std::vector< std::unique_ptr< display::DisplayElement > > const & osmdb::DisplayDB::get_display_elements ( ) [virtual]
Returns:
the DisplayElements in current view.

Implements display::DisplayProvider.

Definition at line 45 of file DisplayDB.cpp.

std::vector< std::unique_ptr< osm::Element > > osmdb::DisplayDB::get_selected ( geo::Point const &  topleft,
geo::Point const &  bottomright,
int  zoom 
) [virtual]

Retrieve osm::Elements in box specified by topleft and bottomright when current zoom level is zoom.

Parameters:
topleft
bottomright
zoom
Returns:
displayed osm::Elements in box

Implements display::DisplayProvider.

Definition at line 65 of file DisplayDB.cpp.

void osmdb::DisplayDB::set_bounds ( geo::Point const &  topleft,
geo::Point const &  bottomright,
int  zoom 
) [virtual]

Change current view to position bounded by topleft and bottomright using zoomlevel zoom.

Parameters:
topleft
bottomright
zoom

Implements display::DisplayProvider.

Definition at line 50 of file DisplayDB.cpp.


The documentation for this class was generated from the following files:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines