NNGrid supports nameID of edges.
This commit is contained in:
@@ -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.)));
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user