Fixing premature push to master repo

This commit is contained in:
DennisOSRM 2011-12-14 19:01:57 +01:00
parent 0df0c85fea
commit a7e7773d85
2 changed files with 12 additions and 9 deletions

View File

@ -29,8 +29,8 @@
#include "EdgeBasedGraphFactory.h" #include "EdgeBasedGraphFactory.h"
template<> template<>
EdgeBasedGraphFactory::EdgeBasedGraphFactory(int nodes, std::vector<NodeBasedEdge> & inputEdges, std::vector<_Restriction> & irs, std::vector<NodeInfo> & nI) EdgeBasedGraphFactory::EdgeBasedGraphFactory(int nodes, std::vector<NodeBasedEdge> & inputEdges, std::vector<_Restriction> & irs, std::vector<NodeInfo> & nI, std::string & srtm)
: inputRestrictions(irs), inputNodeInfoList(nI) { : inputRestrictions(irs), inputNodeInfoList(nI)/*, srtmLookup(srtm) */{
#ifdef _GLIBCXX_PARALLEL #ifdef _GLIBCXX_PARALLEL
__gnu_parallel::sort(inputRestrictions.begin(), inputRestrictions.end(), CmpRestrictionByFrom); __gnu_parallel::sort(inputRestrictions.begin(), inputRestrictions.end(), CmpRestrictionByFrom);
@ -141,12 +141,12 @@ void EdgeBasedGraphFactory::Run() {
currentNode.lon2 = inputNodeInfoList[v].lon; currentNode.lon2 = inputNodeInfoList[v].lon;
currentNode.id = _nodeBasedGraph->GetEdgeData(e1).edgeBasedNodeID; currentNode.id = _nodeBasedGraph->GetEdgeData(e1).edgeBasedNodeID;
short startHeight = srtmLookup.height(currentNode.lon1/100000.,currentNode.lat1/100000. ); // short startHeight = srtmLookup.height(currentNode.lon1/100000.,currentNode.lat1/100000. );
short targetHeight = srtmLookup.height(currentNode.lon2/100000.,currentNode.lat2/100000. ); // short targetHeight = srtmLookup.height(currentNode.lon2/100000.,currentNode.lat2/100000. );
short heightDiff = startHeight - targetHeight; // short heightDiff = startHeight - targetHeight;
double increase = (heightDiff/ApproximateDistance(currentNode.lat1, currentNode.lon1, currentNode.lat2, currentNode.lon2)); // double increase = (heightDiff/ApproximateDistance(currentNode.lat1, currentNode.lon1, currentNode.lat2, currentNode.lon2));
if(heightDiff != 0) // if(heightDiff != 0)
INFO("Increase at dead-end street: " << heightDiff << ", edge length: " << ApproximateDistance(currentNode.lat1, currentNode.lon1, currentNode.lat2, currentNode.lon2) << ", percentage: " << increase ); // INFO("Increase at dead-end street: " << heightDiff << ", edge length: " << ApproximateDistance(currentNode.lat1, currentNode.lon1, currentNode.lat2, currentNode.lon2) << ", percentage: " << increase );
//incorporate height diff; //incorporate height diff;
//todo: get some exponential function to converge to one for n->\infty //todo: get some exponential function to converge to one for n->\infty

View File

@ -34,6 +34,7 @@
#include "../DataStructures/ImportEdge.h" #include "../DataStructures/ImportEdge.h"
#include "../DataStructures/Percent.h" #include "../DataStructures/Percent.h"
#include "../DataStructures/TurnInstructions.h" #include "../DataStructures/TurnInstructions.h"
//#include "../Util/SRTMLookup.h"
class EdgeBasedGraphFactory { class EdgeBasedGraphFactory {
private: private:
@ -88,9 +89,11 @@ private:
template<class CoordinateT> template<class CoordinateT>
double GetAngleBetweenTwoEdges(const CoordinateT& A, const CoordinateT& C, const CoordinateT& B) const; double GetAngleBetweenTwoEdges(const CoordinateT& A, const CoordinateT& C, const CoordinateT& B) const;
// SRTMLookup srtmLookup;
public: public:
template< class InputEdgeT > template< class InputEdgeT >
explicit EdgeBasedGraphFactory(int nodes, std::vector<InputEdgeT> & inputEdges, std::vector<_Restriction> & inputRestrictions, std::vector<NodeInfo> & nI); explicit EdgeBasedGraphFactory(int nodes, std::vector<InputEdgeT> & inputEdges, std::vector<_Restriction> & inputRestrictions, std::vector<NodeInfo> & nI, std::string & srtm);
virtual ~EdgeBasedGraphFactory(); virtual ~EdgeBasedGraphFactory();
void Run(); void Run();