alaCarte Maps
Renderer for OpenStreetMap tiles
Geodata Class Reference

#include <geodata.hpp>

Public Member Functions

 Geodata ()=default
 
virtual ~Geodata ()=default
 
TESTABLE void insertNodes (const shared_ptr< std::vector< Node > > &nodes)
 
TESTABLE void insertWays (const shared_ptr< std::vector< Way > > &ways)
 
TESTABLE void insertRelations (const shared_ptr< std::vector< Relation > > &relations)
 
bool containsData (const FixedRect &rect) const
 
TESTABLE shared_ptr< std::vector< NodeId > > getNodeIDs (const FixedRect &rect) const
 
TESTABLE shared_ptr< std::vector< WayId > > getWayIDs (const FixedRect &rect) const
 
TESTABLE shared_ptr< std::vector< RelId > > getRelationIDs (const FixedRect &rect) const
 
TESTABLE NodegetNode (NodeId id) const
 
TESTABLE WaygetWay (WayId id) const
 
TESTABLE RelationgetRelation (RelId id) const
 
TESTABLE void load (const string &path)
 
TESTABLE void save (const string &path)
 

Protected Attributes

shared_ptr< std::vector< Way > > ways
 
shared_ptr< std::vector< Node > > nodes
 
shared_ptr< std::vector< Relation > > relations
 
shared_ptr< RTree< NodeId, FixedPoint > > nodesTree
 note the trees are initialized by buildTree on serialisation More...
 
shared_ptr< RTree< WayId, FixedRect > > waysTree
 
shared_ptr< RTree< RelId, FixedRect > > relTree
 

Private Member Functions

void buildTrees (const string &nodePath, const string &wayPath, const string &relationPath)
 This file is part of alaCarte. More...
 
void serialize (const string &serPath) const
 
TESTABLE FixedRect calculateBoundingBox (const Way &way) const
 
TESTABLE FixedRect calculateBoundingBox (const Relation &relation) const
 
FixedRect calculateBoundingBox (const std::vector< NodeId > &nodeIDs) const
 
FixedRect calculateBoundingBox (const std::vector< WayId > &nodeIDs) const
 
template<typename Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 

Detailed Description

Definition at line 41 of file geodata.hpp.

Constructor & Destructor Documentation

Geodata::Geodata ( )
default
virtual Geodata::~Geodata ( )
virtualdefault

Member Function Documentation

void Geodata::buildTrees ( const string nodePath,
const string wayPath,
const string relationPath 
)
private

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: Lisa Wintercalled when data is serialized to file

Definition at line 49 of file geodata.cpp.

FixedRect Geodata::calculateBoundingBox ( const Way way) const
private

Definition at line 218 of file geodata.cpp.

FixedRect Geodata::calculateBoundingBox ( const Relation relation) const
private

Definition at line 223 of file geodata.cpp.

FixedRect Geodata::calculateBoundingBox ( const std::vector< NodeId > &  nodeIDs) const
private

Definition at line 256 of file geodata.cpp.

FixedRect Geodata::calculateBoundingBox ( const std::vector< WayId > &  nodeIDs) const
private

Definition at line 279 of file geodata.cpp.

bool Geodata::containsData ( const FixedRect rect) const

Definition at line 100 of file geodata.cpp.

Node * Geodata::getNode ( NodeId  id) const

Definition at line 131 of file geodata.cpp.

shared_ptr< std::vector< NodeId > > Geodata::getNodeIDs ( const FixedRect rect) const

Definition at line 107 of file geodata.cpp.

Relation * Geodata::getRelation ( RelId  id) const

Definition at line 141 of file geodata.cpp.

shared_ptr< std::vector< RelId > > Geodata::getRelationIDs ( const FixedRect rect) const

Definition at line 123 of file geodata.cpp.

Way * Geodata::getWay ( WayId  id) const

Definition at line 136 of file geodata.cpp.

shared_ptr< std::vector< WayId > > Geodata::getWayIDs ( const FixedRect rect) const

Definition at line 115 of file geodata.cpp.

void Geodata::insertNodes ( const shared_ptr< std::vector< Node > > &  nodes)

Definition at line 79 of file geodata.cpp.

void Geodata::insertRelations ( const shared_ptr< std::vector< Relation > > &  relations)

Definition at line 93 of file geodata.cpp.

void Geodata::insertWays ( const shared_ptr< std::vector< Way > > &  ways)

Definition at line 86 of file geodata.cpp.

void Geodata::load ( const string path)

Definition at line 146 of file geodata.cpp.

void Geodata::save ( const string path)

Definition at line 184 of file geodata.cpp.

void Geodata::serialize ( const string serPath) const
private

Definition at line 175 of file geodata.cpp.

template<typename Archive >
void Geodata::serialize ( Archive ar,
const unsigned int  version 
)
inlineprivate

Definition at line 84 of file geodata.hpp.

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 82 of file geodata.hpp.

Member Data Documentation

shared_ptr<std::vector<Node> > Geodata::nodes
protected

Definition at line 66 of file geodata.hpp.

shared_ptr<RTree<NodeId, FixedPoint> > Geodata::nodesTree
protected

note the trees are initialized by buildTree on serialisation

Definition at line 70 of file geodata.hpp.

shared_ptr<std::vector<Relation> > Geodata::relations
protected

Definition at line 67 of file geodata.hpp.

shared_ptr<RTree<RelId, FixedRect> > Geodata::relTree
protected

Definition at line 72 of file geodata.hpp.

shared_ptr<std::vector<Way> > Geodata::ways
protected

Definition at line 65 of file geodata.hpp.

shared_ptr<RTree<WayId, FixedRect> > Geodata::waysTree
protected

Definition at line 71 of file geodata.hpp.


The documentation for this class was generated from the following files: