diff --git a/io/Templates/Template_jun_2M.xml b/examples/Templates/Template_jun_2M.xml
similarity index 100%
rename from io/Templates/Template_jun_2M.xml
rename to examples/Templates/Template_jun_2M.xml
diff --git a/io/Templates/Template_jun_3A.xml b/examples/Templates/Template_jun_3A.xml
similarity index 100%
rename from io/Templates/Template_jun_3A.xml
rename to examples/Templates/Template_jun_3A.xml
diff --git a/io/Templates/Template_jun_M2A.xml b/examples/Templates/Template_jun_M2A.xml
similarity index 100%
rename from io/Templates/Template_jun_M2A.xml
rename to examples/Templates/Template_jun_M2A.xml
diff --git a/io/Templates/Template_jun_MA.xml b/examples/Templates/Template_jun_MA.xml
similarity index 100%
rename from io/Templates/Template_jun_MA.xml
rename to examples/Templates/Template_jun_MA.xml
diff --git a/io/Templates/Template_road.xml b/examples/Templates/Template_road.xml
similarity index 100%
rename from io/Templates/Template_road.xml
rename to examples/Templates/Template_road.xml
diff --git a/io/Templates/Template_roundabout.xml b/examples/Templates/Template_roundabout.xml
similarity index 100%
rename from io/Templates/Template_roundabout.xml
rename to examples/Templates/Template_roundabout.xml
diff --git a/examples/carla_test.xml b/examples/carla_test.xml
deleted file mode 100644
index 7d2d92d2..00000000
--- a/examples/carla_test.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/close_network.xml b/examples/close_network.xml
new file mode 100644
index 00000000..19e9bf11
--- /dev/null
+++ b/examples/close_network.xml
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/con_lanewiden.xml b/examples/close_roads.xml
similarity index 94%
rename from examples/con_lanewiden.xml
rename to examples/close_roads.xml
index d5898164..86338167 100644
--- a/examples/con_lanewiden.xml
+++ b/examples/close_roads.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/examples/complex.xml b/examples/complex.xml
deleted file mode 100644
index 4f5b4080..00000000
--- a/examples/complex.xml
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/err.xml b/examples/err.xml
deleted file mode 100644
index 9136f253..00000000
--- a/examples/err.xml
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/err_only_jun.xml b/examples/err_only_jun.xml
deleted file mode 100644
index edfccea9..00000000
--- a/examples/err_only_jun.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/geomBug.xml b/examples/geomBug.xml
deleted file mode 100644
index 9136f253..00000000
--- a/examples/geomBug.xml
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/jun_m2a_round.xml b/examples/jun_m2a_round.xml
deleted file mode 100644
index 38b0191f..00000000
--- a/examples/jun_m2a_round.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/junction_ma.xml b/examples/junction_ma.xml
index bb5f7ede..9d1c91db 100644
--- a/examples/junction_ma.xml
+++ b/examples/junction_ma.xml
@@ -3,7 +3,7 @@
-
+
@@ -11,7 +11,7 @@
-
+
diff --git a/examples/junction_templateM2A.xml b/examples/junction_templateM2A.xml
deleted file mode 100644
index 303e6bb8..00000000
--- a/examples/junction_templateM2A.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/rb_crash.xml b/examples/rb_crash.xml
deleted file mode 100644
index 021221f4..00000000
--- a/examples/rb_crash.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/rb_linking_bug.xml b/examples/rb_linking_bug.xml
deleted file mode 100644
index 29e09d94..00000000
--- a/examples/rb_linking_bug.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/small_test.xml b/examples/small_test.xml
deleted file mode 100644
index 25c4fee7..00000000
--- a/examples/small_test.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/connection/linkSegments.h b/src/connection/linkSegments.h
index 0b16afe3..c79b3f82 100644
--- a/src/connection/linkSegments.h
+++ b/src/connection/linkSegments.h
@@ -410,6 +410,10 @@ int linkSegments(const DOMElement* rootNode, roadNetwork &data)
DOMElement *links = getChildWithName(rootNode, "links");
if (links == NULL)
{
+ if(!setting.silentMode)
+ {
+ cout << "\tLinks are not specified -> skip segment linking" << endl;
+ }
throwWarning("'links' are not specified in input file.\n\t -> skip segment linking", true);
resolveLaneLinkConflicts(data);
@@ -445,6 +449,19 @@ int linkSegments(const DOMElement* rootNode, roadNetwork &data)
std::map> outgoing_connections;
std::map> incoming_connections;
+
+ int linkcount = links->getChildElementCount();
+
+ if(linkcount <= 0 && !setting.silentMode)
+ {
+ cout << "\tNo links were defined" << endl;
+ return 0;
+ }
+ else if(!setting.silentMode)
+ {
+ cout << "\t"<< linkcount << " links were defined" << endl;
+ }
+
for (DOMElement *segmentLink = links->getFirstElementChild();segmentLink != NULL; segmentLink = segmentLink->getNextElementSibling())
{
int fromSegment = readIntAttrFromNode(segmentLink, "fromSegment");
@@ -480,7 +497,7 @@ int linkSegments(const DOMElement* rootNode, roadNetwork &data)
//process the element------------------
transformRoad(segmentLink, data);
//end processessing the element--------
- break; //prevents multiple processing steps if they are defined in the xml (they shoudlnt be)
+ break; //prevents multiple processing steps if they are defined in the xml (they shouldn't be)
}
toDo.push(e);
@@ -497,7 +514,7 @@ int linkSegments(const DOMElement* rootNode, roadNetwork &data)
if(curId != readIntAttrFromNode(segmentLink, "toSegment") || incoming_id != readIntAttrFromNode(segmentLink, "fromSegment")) continue;
//process the element------------------
transformRoad(segmentLink, data, true);
- break; //prevents multiple processing steps if they are defined in the xml (they shoudlnt be)
+ break; //prevents multiple processing steps if they are defined in the xml (they shouldn't be)
}
toDo.push(incoming_id);
@@ -506,7 +523,7 @@ int linkSegments(const DOMElement* rootNode, roadNetwork &data)
//check if all roads are connected to the network
vector v;
- for(road r: data.roads)
+ for(road &r: data.roads)
{
if(!r.isLinkedToNetwork)
{
@@ -519,7 +536,7 @@ int linkSegments(const DOMElement* rootNode, roadNetwork &data)
for(road* p: v)
{
if(!setting.silentMode)
- cout << "\tRoad " << p->inputSegmentId << " is not linked"<< endl;
+ cout << "\tRoad " << p->inputId << " in segment " << p->inputSegmentId << " is not linked"<< endl;
std::cerr << "\tRoad " << p->inputSegmentId << " is not linked"<< endl;
}