-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add structure for PBF source, choose based on file extension
- Loading branch information
Showing
4 changed files
with
141 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
// Copyright 2024, University of Freiburg, | ||
// Chair of Algorithms and Data Structures. | ||
// Authors: Patrick Brosi <[email protected]> | ||
|
||
#include "pfaedle/osm/source/PBFSource.h" | ||
#include "util/Misc.h" | ||
|
||
using pfaedle::osm::source::PBFSource; | ||
using pfaedle::osm::source::OsmSourceNode; | ||
using pfaedle::osm::source::OsmSourceWay; | ||
using pfaedle::osm::source::OsmSourceRelation; | ||
using pfaedle::osm::source::OsmSourceRelationMember; | ||
using pfaedle::osm::source::OsmSourceAttr; | ||
|
||
// _____________________________________________________________________________ | ||
PBFSource::PBFSource(const std::string& path) : _path(path) { | ||
std::cout << "Init PBF source" << std::endl; | ||
} | ||
|
||
// _____________________________________________________________________________ | ||
const OsmSourceNode* PBFSource::nextNode() { | ||
return 0; | ||
} | ||
|
||
// _____________________________________________________________________________ | ||
void PBFSource::seekNodes() { | ||
} | ||
|
||
// _____________________________________________________________________________ | ||
void PBFSource::seekWays() { | ||
} | ||
|
||
// _____________________________________________________________________________ | ||
void PBFSource::seekRels() { | ||
} | ||
|
||
// _____________________________________________________________________________ | ||
void PBFSource::cont() { | ||
} | ||
|
||
// _____________________________________________________________________________ | ||
const OsmSourceWay* PBFSource::nextWay() { | ||
return 0; | ||
} | ||
|
||
// _____________________________________________________________________________ | ||
const OsmSourceRelationMember* PBFSource::nextMember() { | ||
return 0; | ||
} | ||
|
||
// _____________________________________________________________________________ | ||
uint64_t PBFSource::nextMemberNode() { | ||
return 0; | ||
} | ||
|
||
// _____________________________________________________________________________ | ||
const OsmSourceRelation* PBFSource::nextRel() { | ||
return 0; | ||
} | ||
|
||
// _____________________________________________________________________________ | ||
const OsmSourceAttr PBFSource::nextAttr() { | ||
} | ||
|
||
|
||
// _____________________________________________________________________________ | ||
util::geo::Box<double> PBFSource::getBounds() { | ||
} | ||
|
||
// _____________________________________________________________________________ | ||
std::string PBFSource::decode(const char* str) const { | ||
return str; // TODO | ||
} | ||
|
||
// _____________________________________________________________________________ | ||
std::string PBFSource::decode(const std::string& str) const { | ||
return str; // TODO | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright 2024, University of Freiburg, | ||
// Chair of Algorithms and Data Structures. | ||
// Authors: Patrick Brosi <[email protected]> | ||
|
||
#ifndef PFAEDLE_OSM_SOURCE_PBFSOURCE_H_ | ||
#define PFAEDLE_OSM_SOURCE_PBFSOURCE_H_ | ||
|
||
#include "pfaedle/osm/source/OsmSource.h" | ||
|
||
|
||
namespace pfaedle { | ||
namespace osm { | ||
namespace source { | ||
|
||
class PBFSource : public OsmSource { | ||
public: | ||
PBFSource(const std::string& path); | ||
virtual const OsmSourceNode* nextNode(); | ||
virtual const OsmSourceAttr nextAttr(); | ||
virtual const OsmSourceWay* nextWay(); | ||
virtual uint64_t nextMemberNode(); | ||
virtual const OsmSourceRelationMember* nextMember(); | ||
virtual const OsmSourceRelation* nextRel(); | ||
virtual void cont(); | ||
|
||
virtual void seekNodes(); | ||
virtual void seekWays(); | ||
virtual void seekRels(); | ||
|
||
virtual util::geo::Box<double> getBounds(); | ||
|
||
virtual std::string decode(const char* str) const; | ||
virtual std::string decode(const std::string& str) const; | ||
private: | ||
std::string _path; | ||
}; | ||
|
||
} // namespace source | ||
} // namespace osm | ||
} // namespace pfaedle | ||
|
||
#endif |