Skip to content

Commit

Permalink
removed obsolete warning. all networks contain the edge shape and are…
Browse files Browse the repository at this point in the history
… built with keep-shape by default. Warnings about mismatched junction shape/position are given somewhere else. refs #12

git-svn-id: file:///home/behr_mi/git/sumo_synched/trunk@16097 afbd958f-9f77-42d5-a016-97a22340ccf4
  • Loading branch information
namdre committed Apr 2, 2014
1 parent e171b63 commit a9a06a7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
19 changes: 0 additions & 19 deletions sumo/src/netimport/NIImporter_SUMO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ NIImporter_SUMO::NIImporter_SUMO(NBNetBuilder& nb)
myCurrentLane(0),
myCurrentTL(0),
myLocation(0),
mySuspectKeepShape(false),
myHaveSeenInternalEdge(false)
{}

Expand Down Expand Up @@ -139,7 +138,6 @@ NIImporter_SUMO::_loadNetwork(OptionsCont& oc) {
PositionVector geom;
if (ed->shape.size() > 0) {
geom = ed->shape;
mySuspectKeepShape = false; // no problem with reconstruction if edge shape is given explicit
} else {
// either the edge has default shape consisting only of the two node
// positions or we have a legacy network
Expand Down Expand Up @@ -235,11 +233,6 @@ NIImporter_SUMO::_loadNetwork(OptionsCont& oc) {
if (!myHaveSeenInternalEdge && oc.isDefault("no-internal-links")) {
oc.set("no-internal-links", "true");
}
// final warning
if (mySuspectKeepShape) {
WRITE_WARNING("The input network may have been built using option 'xml.keep-shape'.\n... Accuracy of junction positions cannot be guaranteed.");
}

}


Expand Down Expand Up @@ -432,18 +425,6 @@ NIImporter_SUMO::addJunction(const SUMOSAXAttributes& attrs) {
}
Position pos = readPosition(attrs, id, ok);
NBNetBuilder::transformCoordinates(pos, true, myLocation);
// the network may have non-default edge geometry.
// accurate reconstruction of legacy networks is not possible. We ought to warn about this
if (attrs.hasAttribute(SUMO_ATTR_SHAPE)) {
PositionVector shape = attrs.getOpt<PositionVector>(SUMO_ATTR_SHAPE, id.c_str(), ok, PositionVector());
if (shape.size() > 0) {
shape.push_back_noDoublePos(shape[0]); // need closed shape
if (!shape.around(pos) && shape.distance(pos) > 1) { // MAGIC_THRESHOLD
// WRITE_WARNING("Junction '" + id + "': distance between pos and shape is " + toString(shape.distance(pos)));
mySuspectKeepShape = true;
}
}
}
NBNode* node = new NBNode(id, pos, type);
if (!myNodeCont.insert(node)) {
WRITE_ERROR("Problems on adding junction '" + id + "'.");
Expand Down
3 changes: 0 additions & 3 deletions sumo/src/netimport/NIImporter_SUMO.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,6 @@ class NIImporter_SUMO : public SUMOSAXHandler {
/// @brief The coordinate transformation which was used to build the loaded network.
GeoConvHelper* myLocation;

/// @brief whether we suspect a net that was built with xml.keep-shape
bool mySuspectKeepShape;

/// @brief whether the loaded network contains internal lanes
bool myHaveSeenInternalEdge;

Expand Down

0 comments on commit a9a06a7

Please sign in to comment.