NNGrid supports nameID of edges.

This commit is contained in:
DennisOSRM
2011-11-15 16:47:53 +01:00
parent eca2c0c5ef
commit caf8cd701e
3 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -198,7 +198,7 @@ public:
int tlat = 100000*lat2y(edge.lat2/100000.);
int tlon = edge.lon2;
AddEdge( _GridEdge(
edge.id,
edge.id, edge.nameID,
_Coordinate(slat, slon),
_Coordinate(tlat, tlon) )
);
@@ -312,6 +312,7 @@ public:
if(tmpDist < dist) {
resultNode.isBidirected = false;
resultNode.edgeBasedNode = candidate.edgeBasedNode;
resultNode.nodeBasedEdgeNameID = candidate.nameID;
resultNode.ratio = r;
dist = tmpDist;
resultNode.location.lat = round(100000*(y2lat(static_cast<double>(tmp.lat)/100000.)));
+2 -1
View File
@@ -24,9 +24,10 @@ or see http://www.gnu.org/licenses/agpl.txt.
#include "ExtractorStructs.h"
struct PhantomNode {
PhantomNode() : isBidirected(false), edgeBasedNode(UINT_MAX), ratio(1.) {}
PhantomNode() : isBidirected(false), edgeBasedNode(UINT_MAX), nodeBasedEdgeNameID(UINT_MAX), ratio(1.) {}
bool isBidirected;
NodeID edgeBasedNode;
unsigned nodeBasedEdgeNameID;
double ratio;
_Coordinate location;
void Reset() {