dont delete orphan edges anymore, might remove some candidates for edge snapping
This commit is contained in:
parent
136fae1cf1
commit
22bc04aa9d
2 changed files with 0 additions and 31 deletions
|
@ -137,18 +137,12 @@ void OsmBuilder::read(const std::string& path, const OsmReadOpts& opts,
|
|||
LOG(DEBUG) << "Snapping stations...";
|
||||
snapStats(opts, g, bbox, gridSize, res, orphanStations);
|
||||
|
||||
LOG(DEBUG) << "Deleting orphan edges...";
|
||||
deleteOrphEdgs(g, opts);
|
||||
|
||||
LOG(DEBUG) << "Collapsing edges...";
|
||||
collapseEdges(g);
|
||||
|
||||
LOG(DEBUG) << "Writing edge geoms...";
|
||||
writeGeoms(g, opts);
|
||||
|
||||
LOG(DEBUG) << "Deleting orphan edges...";
|
||||
deleteOrphEdgs(g, opts);
|
||||
|
||||
LOG(DEBUG) << "Deleting orphan nodes...";
|
||||
deleteOrphNds(g, opts);
|
||||
|
||||
|
@ -1566,30 +1560,6 @@ void OsmBuilder::deleteOrphNds(Graph* g, const OsmReadOpts& opts) {
|
|||
}
|
||||
}
|
||||
|
||||
// _____________________________________________________________________________
|
||||
void OsmBuilder::deleteOrphEdgs(Graph* g, const OsmReadOpts& opts) {
|
||||
size_t ROUNDS = 3;
|
||||
for (size_t c = 0; c < ROUNDS; c++) {
|
||||
for (auto i = g->getNds().begin(); i != g->getNds().end();) {
|
||||
if ((*i)->getInDeg() + (*i)->getOutDeg() != 1 || (*i)->pl().getSI() ||
|
||||
(*i)->pl().isTurnCycle()) {
|
||||
++i;
|
||||
continue;
|
||||
}
|
||||
|
||||
// check if the removal of this edge would transform a steep angle
|
||||
// full turn at an intersection into a node 2 eligible for contraction
|
||||
// if so, dont delete
|
||||
if (keepFullTurn(*i, opts.fullTurnAngle)) {
|
||||
++i;
|
||||
continue;
|
||||
}
|
||||
|
||||
i = g->delNd(*i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// _____________________________________________________________________________
|
||||
bool OsmBuilder::edgesSim(const Edge* a, const Edge* b) {
|
||||
if (static_cast<bool>(a->pl().oneWay()) ^ static_cast<bool>(b->pl().oneWay()))
|
||||
|
|
|
@ -180,7 +180,6 @@ class OsmBuilder {
|
|||
double gridSize, Restrictor* res,
|
||||
const NodeSet& orphanStations);
|
||||
static void writeGeoms(Graph* g, const OsmReadOpts& opts);
|
||||
static void deleteOrphEdgs(Graph* g, const OsmReadOpts& opts);
|
||||
static void deleteOrphNds(Graph* g, const OsmReadOpts& opts);
|
||||
static double dist(const Node* a, const Node* b);
|
||||
|
||||
|
|
Loading…
Reference in a new issue