Skip to content

Commit

Permalink
Add a comment to explain why we do not directly call EuclideanGeoFilt…
Browse files Browse the repository at this point in the history
…er in

the OSRMGeoFilter, in the first filter pass
  • Loading branch information
greenscientist committed Oct 23, 2023
1 parent ea27e1d commit 47b1615
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/osrmgeofilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ namespace TrRouting {

std::string queryString = "/table/v1/" + mode + "/" + std::to_string(point.longitude) + "," + std::to_string(point.latitude);

// We first filter the nodes with euclidean distance using the common distance calculation
// to only send a subset of nodes to OSRM. We do not reuse the EuclideanGeoFilter directly, since
// we process the data differently here. (We directly compute the OSRM query.)
for (auto &&[uuid,node] : nodes)
{
distanceMetersSquared = calculateNodeDistanceSquared(node.point.get(), point, lengthOfOneDegree);
Expand Down

0 comments on commit 47b1615

Please sign in to comment.