make geometry precision configurable for build
This commit is contained in:
parent
486a8136fd
commit
8446db5c4b
25 changed files with 222 additions and 208 deletions
|
|
@ -22,17 +22,17 @@ namespace netgraph {
|
|||
* A payload class for edges on a network graph - that is a graph
|
||||
* that exactly represents a physical public transit network
|
||||
*/
|
||||
class EdgePL : public GeoEdgePL<double> {
|
||||
class EdgePL : public GeoEdgePL<PFAEDLE_PRECISION> {
|
||||
public:
|
||||
EdgePL() {}
|
||||
EdgePL(const util::geo::DLine& l, const std::set<const Trip*>& trips)
|
||||
EdgePL(const LINE& l, const std::set<const Trip*>& trips)
|
||||
: _l(l), _trips(trips) {
|
||||
for (const auto t : _trips) {
|
||||
_routeShortNames.insert(t->getRoute()->getShortName());
|
||||
_tripShortNames.insert(t->getShortname());
|
||||
}
|
||||
}
|
||||
const util::geo::DLine* getGeom() const { return &_l; }
|
||||
const LINE* getGeom() const { return &_l; }
|
||||
util::json::Dict getAttrs() const {
|
||||
util::json::Dict obj;
|
||||
obj["num_trips"] = static_cast<int>(_trips.size());
|
||||
|
|
@ -44,7 +44,7 @@ class EdgePL : public GeoEdgePL<double> {
|
|||
}
|
||||
|
||||
private:
|
||||
util::geo::DLine _l;
|
||||
LINE _l;
|
||||
std::set<const Trip*> _trips;
|
||||
std::set<std::string> _routeShortNames;
|
||||
std::set<std::string> _tripShortNames;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
|
||||
using util::geo::Point;
|
||||
using util::geo::Line;
|
||||
using util::geo::DPoint;
|
||||
using util::geo::DLine;
|
||||
|
||||
|
||||
|
||||
namespace pfaedle {
|
||||
namespace netgraph {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include "util/geo/GeoGraph.h"
|
||||
|
||||
using util::geograph::GeoNodePL;
|
||||
using util::geo::DPoint;
|
||||
|
||||
|
||||
namespace pfaedle {
|
||||
namespace netgraph {
|
||||
|
|
@ -20,18 +20,18 @@ namespace netgraph {
|
|||
* A payload class for edges on a network graph - that is a graph
|
||||
* that exactly represents a physical public transit network
|
||||
*/
|
||||
class NodePL : public GeoNodePL<double> {
|
||||
class NodePL : public GeoNodePL<PFAEDLE_PRECISION> {
|
||||
public:
|
||||
NodePL() {}
|
||||
NodePL(const util::geo::DPoint& geom) { _geom = geom; } // NOLINT
|
||||
NodePL(const POINT& geom) { _geom = geom; } // NOLINT
|
||||
|
||||
const DPoint* getGeom() const { return &_geom; }
|
||||
const POINT* getGeom() const { return &_geom; }
|
||||
util::json::Dict getAttrs() const {
|
||||
return util::json::Dict();
|
||||
}
|
||||
|
||||
private:
|
||||
DPoint _geom;
|
||||
POINT _geom;
|
||||
};
|
||||
} // namespace netgraph
|
||||
} // namespace pfaedle
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue