57 #ifdef CHECK_MEMORY_LEAKS
59 #endif // CHECK_MEMORY_LEAKS
66 myEdgeCont(myTypeCont),
67 myHaveSeenRoundabouts(false)
77 if (oc.
isSet(
"keep-edges.input-file")) {
78 std::ifstream strm(oc.
getString(
"keep-edges.input-file").c_str());
80 throw ProcessError(
"Could not load names of edges too keep from '" + oc.
getString(
"keep-edges.input-file") +
"'.");
82 std::ostringstream oss;
93 oc.
set(
"keep-edges.explicit", oss.str());
106 const std::set<std::string>& explicitTurnarounds,
107 bool removeUnwishedNodes) {
118 if (oc.
exists(
"remove-edges.isolated") && oc.
getBool(
"remove-edges.isolated")) {
124 if (oc.
exists(
"keep-edges.postload") && oc.
getBool(
"keep-edges.postload")) {
125 if (oc.
isSet(
"keep-edges.explicit")) {
132 if (removeUnwishedNodes) {
134 const bool removeGeometryNodes = oc.
exists(
"geometry.remove") && oc.
getBool(
"geometry.remove");
135 PROGRESS_BEGIN_MESSAGE(
"Removing empty nodes" + std::string(removeGeometryNodes ?
" and geometry nodes" :
""));
146 if (oc.
exists(
"geometry.min-dist") && oc.
isSet(
"geometry.min-dist")) {
159 if (oc.
exists(
"junctions.join-exclude") && oc.
isSet(
"junctions.join-exclude")) {
163 if (oc.
getBool(
"junctions.join")) {
176 for (std::vector<EdgeVector>::const_iterator it_round =
myRoundabouts.begin();
178 std::vector<std::string> nodeIDs;
179 for (EdgeVector::const_iterator it_edge = it_round->begin(); it_edge != it_round->end(); ++it_edge) {
180 nodeIDs.push_back((*it_edge)->getToNode()->getID());
194 if (oc.
exists(
"geometry.split") && oc.
getBool(
"geometry.split")) {
213 if (oc.
exists(
"speed.offset")) {
216 if (speedOffset != 0 || speedFactor != 1) {
219 (*i).second->setSpeed(-1, (*i).second->getSpeed() * speedFactor + speedOffset);
263 if (!oc.
getBool(
"no-turnarounds")) {
288 if (oc.
isSet(
"tls.set")) {
289 std::vector<std::string> tlControlledNodes = oc.
getStringVector(
"tls.set");
291 for (std::vector<std::string>::const_iterator i = tlControlledNodes.begin(); i != tlControlledNodes.end(); ++i) {
294 WRITE_WARNING(
"Building a tl-logic for node '" + *i +
"' is not possible." +
"\n The node '" + *i +
"' is not known.");
323 std::string progCount =
"";
324 if (numbers.first != numbers.second) {
325 progCount =
"(" +
toString(numbers.second) +
" programs) ";
329 if (oc.
isSet(
"street-sign-output")) {
336 if (!oc.
getBool(
"no-internal-links")) {
339 (*i).second->sortOutgoingConnectionsByIndex();
342 (*i).second->buildInnerEdges();
349 WRITE_MESSAGE(
"-----------------------------------------------------");
356 WRITE_MESSAGE(
"-----------------------------------------------------");
361 WRITE_WARNING(
"Network contains very large coordinates and will probably flicker in the GUI. Check for outlying nodes and make sure the network is shifted to the coordinate origin");
372 boundary.
add(it->second->getPosition());
375 boundary.
add(it->second->getGeometry().getBoxBoundary());
381 (*i).second->reshiftPosition(x, y);
384 (*i).second->reshiftPosition(x, y);
387 (*i).second->reshiftPosition(x, y);