-
Notifications
You must be signed in to change notification settings - Fork 74
v0.2.49..v0.2.50 changeset NetworkDetails.cpp
Garret Voltz edited this page Nov 6, 2019
·
1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/conflate/network/NetworkDetails.cpp b/hoot-core/src/main/cpp/hoot/core/conflate/network/NetworkDetails.cpp
index 457d327..c64e0a3 100644
--- a/hoot-core/src/main/cpp/hoot/core/conflate/network/NetworkDetails.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/conflate/network/NetworkDetails.cpp
@@ -192,9 +192,7 @@ QList<EdgeSublineMatchPtr> NetworkDetails::calculateMatchingSublines(ConstNetwor
{
subline2->reverse();
}
- EdgeSublineMatchPtr m(new EdgeSublineMatch(
- _toEdgeSubline(wsm.getSubline1(), e1),
- subline2));
+ EdgeSublineMatchPtr m(new EdgeSublineMatch(_toEdgeSubline(wsm.getSubline1(), e1), subline2));
result.append(m);
}
@@ -1123,7 +1121,13 @@ WayStringPtr NetworkDetails::toWayString(ConstEdgeStringPtr e, const EidMapper&
throw IllegalArgumentException("Expected a network edge with exactly 1 way.");
}
ElementId eid = mapper.mapEid(e->getMembers()[0]->getElementId());
+
ConstWayPtr w = std::dynamic_pointer_cast<const Way>(_map->getWay(eid));
+ if (!w)
+ {
+ LOG_VART(eid);
+ throw IllegalArgumentException("Way: " + eid.toString() + " does not exist in the map.");
+ }
Meters l = calculateLength(e);
double startP = subline->getStart()->getPortion();
@@ -1135,6 +1139,7 @@ WayStringPtr NetworkDetails::toWayString(ConstEdgeStringPtr e, const EidMapper&
}
}
+ LOG_VARD(ws);
return ws;
}