28 #include <boost/archive/text_oarchive.hpp> 29 #include <boost/archive/text_iarchive.hpp> 30 #include <boost/serialization/vector.hpp> 31 #include <boost/serialization/shared_ptr.hpp> 32 #include <boost/serialization/shared_ptr_132.hpp> 38 template<
class id_t,
class data_t>
65 shared_ptr<std::vector<Way> >
ways;
66 shared_ptr<std::vector<Node> >
nodes;
72 shared_ptr<RTree<RelId, FixedRect>>
relTree;
75 void buildTrees(
const string& nodePath,
const string& wayPath,
const string& relationPath);
76 void serialize(
const string& serPath)
const;
83 template<
typename Archive>
TESTABLE FixedRect calculateBoundingBox(const Way &way) const
shared_ptr< std::vector< Relation > > relations
TESTABLE shared_ptr< std::vector< WayId > > getWayIDs(const FixedRect &rect) const
virtual ~Geodata()=default
bool containsData(const FixedRect &rect) const
shared_ptr< std::vector< Way > > ways
TESTABLE void save(const string &path)
TESTABLE Way * getWay(WayId id) const
TESTABLE void insertWays(const shared_ptr< std::vector< Way > > &ways)
void serialize(Archive &ar, const unsigned int version)
shared_ptr< RTree< NodeId, FixedPoint > > nodesTree
note the trees are initialized by buildTree on serialisation
void buildTrees(const string &nodePath, const string &wayPath, const string &relationPath)
This file is part of alaCarte.
void serialize(const string &serPath) const
TESTABLE shared_ptr< std::vector< RelId > > getRelationIDs(const FixedRect &rect) const
shared_ptr< RTree< RelId, FixedRect > > relTree
TESTABLE void insertRelations(const shared_ptr< std::vector< Relation > > &relations)
shared_ptr< RTree< WayId, FixedRect > > waysTree
TESTABLE Node * getNode(NodeId id) const
shared_ptr< std::vector< Node > > nodes
friend class boost::serialization::access
TESTABLE void load(const string &path)
TESTABLE void insertNodes(const shared_ptr< std::vector< Node > > &nodes)
TESTABLE Relation * getRelation(RelId id) const
TESTABLE shared_ptr< std::vector< NodeId > > getNodeIDs(const FixedRect &rect) const