From 87ff3f9b9b039fe7af1eb102dfa004934e478df5 Mon Sep 17 00:00:00 2001 From: DennisOSRM Date: Tue, 2 Oct 2012 12:12:42 +0200 Subject: [PATCH] Moving check of input data to node-based graph instead of edge-expanded graph. Makes more tests pass. --- createHierarchy.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/createHierarchy.cpp b/createHierarchy.cpp index 5e6c5ca06..0cf847198 100644 --- a/createHierarchy.cpp +++ b/createHierarchy.cpp @@ -115,6 +115,9 @@ int main (int argc, char *argv[]) { NodeID nodeBasedNodeNumber = readBinaryOSRMGraphFromStream(in, edgeList, bollardNodes, trafficLightNodes, &internalToExternalNodeMapping, inputRestrictions); in.close(); INFO(inputRestrictions.size() << " restrictions, " << bollardNodes.size() << " bollard nodes, " << trafficLightNodes.size() << " traffic lights"); + if(0 == edgeList.size()) + ERR("The input data is broken. It is impossible to do any turns in this graph"); + if(!testDataFile("profile.lua")) { ERR("Need profile.lua to apply traffic signal penalty"); @@ -160,9 +163,6 @@ int main (int argc, char *argv[]) { NodeID edgeBasedNodeNumber = edgeBasedGraphFactory->GetNumberOfNodes(); DeallocatingVector edgeBasedEdgeList; edgeBasedGraphFactory->GetEdgeBasedEdges(edgeBasedEdgeList); - if(0 == edgeBasedEdgeList.size()) - ERR("The input data is broken. It is impossible to do any turns in this graph"); - /*** * Writing info on original (node-based) nodes