Checking if input graph is empty

This commit is contained in:
DennisOSRM 2012-08-21 16:34:56 +02:00
parent 5d2c2a3107
commit a911089913

View File

@ -111,8 +111,6 @@ int main (int argc, char *argv[]) {
std::vector<ImportEdge> edgeList;
NodeID nodeBasedNodeNumber = readBinaryOSRMGraphFromStream(in, edgeList, bollardNodes, trafficLightNodes, &internalToExternalNodeMapping, inputRestrictions);
in.close();
if(0 == edgeList.size())
ERR("Loaded an empty graph");
INFO(inputRestrictions.size() << " restrictions, " << bollardNodes.size() << " bollard nodes, " << trafficLightNodes.size() << " traffic lights");
if(!testDataFile("speedprofile.ini")) {
@ -135,6 +133,9 @@ int main (int argc, char *argv[]) {
NodeID edgeBasedNodeNumber = edgeBasedGraphFactory->GetNumberOfNodes();
DeallocatingVector<EdgeBasedEdge> 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