output all GeoJSON as WGS84 to be RFC 7946 conform
This commit is contained in:
parent
27da2a9c9e
commit
feacae92ef
9 changed files with 5369 additions and 4282 deletions
|
|
@ -57,6 +57,7 @@ struct RoutingOpts {
|
|||
bool noSelfHops;
|
||||
};
|
||||
|
||||
// _____________________________________________________________________________
|
||||
inline bool operator==(const RoutingOpts& a, const RoutingOpts& b) {
|
||||
return fabs(a.fullTurnPunishFac - b.fullTurnPunishFac) < 0.01 &&
|
||||
fabs(a.fullTurnAngle - b.fullTurnAngle) < 0.01 &&
|
||||
|
|
@ -106,22 +107,27 @@ struct EdgeCost {
|
|||
double getValue() const { return _cost; }
|
||||
};
|
||||
|
||||
// _____________________________________________________________________________
|
||||
inline EdgeCost operator+(const EdgeCost& a, const EdgeCost& b) {
|
||||
return EdgeCost(a.getValue() + b.getValue());
|
||||
}
|
||||
|
||||
// _____________________________________________________________________________
|
||||
inline bool operator<=(const EdgeCost& a, const EdgeCost& b) {
|
||||
return a.getValue() <= b.getValue();
|
||||
}
|
||||
|
||||
// _____________________________________________________________________________
|
||||
inline bool operator==(const EdgeCost& a, const EdgeCost& b) {
|
||||
return a.getValue() == b.getValue();
|
||||
}
|
||||
|
||||
// _____________________________________________________________________________
|
||||
inline bool operator>(const EdgeCost& a, const EdgeCost& b) {
|
||||
return a.getValue() > b.getValue();
|
||||
}
|
||||
|
||||
// _____________________________________________________________________________
|
||||
template <typename F>
|
||||
inline bool angSmaller(const Point<F>& f, const Point<F>& m, const Point<F>& t,
|
||||
double ang) {
|
||||
|
|
@ -152,6 +158,7 @@ typedef std::vector<EdgeListHop> EdgeListHops;
|
|||
|
||||
typedef std::set<Route::TYPE> MOTs;
|
||||
|
||||
// _____________________________________________________________________________
|
||||
inline MOTs motISect(const MOTs& a, const MOTs& b) {
|
||||
MOTs ret;
|
||||
for (auto mot : a)
|
||||
|
|
@ -159,6 +166,7 @@ inline MOTs motISect(const MOTs& a, const MOTs& b) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
// _____________________________________________________________________________
|
||||
inline pfaedle::router::FeedStops writeMotStops(const pfaedle::gtfs::Feed* feed,
|
||||
const MOTs mots,
|
||||
const std::string& tid) {
|
||||
|
|
@ -183,6 +191,7 @@ inline pfaedle::router::FeedStops writeMotStops(const pfaedle::gtfs::Feed* feed,
|
|||
return ret;
|
||||
}
|
||||
|
||||
// _____________________________________________________________________________
|
||||
inline std::string getMotStr(const MOTs& mots) {
|
||||
bool first = false;
|
||||
std::string motStr;
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ EdgeListHops ShapeBuilder::route(const router::NodeCandRoute& ncr,
|
|||
LOG(INFO) << "Outputting combgraph.json...";
|
||||
std::ofstream pstr(_cfg.dbgOutputPath + "/combgraph.json");
|
||||
GeoGraphJsonOutput o;
|
||||
o.print(g, pstr);
|
||||
o.printLatLng(g, pstr);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue