From 47b1615a8c2675cbfa2785cffd817cc01e98e9e9 Mon Sep 17 00:00:00 2001 From: Yannick Brosseau Date: Thu, 19 Oct 2023 15:25:03 -0400 Subject: [PATCH] Add a comment to explain why we do not directly call EuclideanGeoFilter in the OSRMGeoFilter, in the first filter pass --- src/osrmgeofilter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osrmgeofilter.cpp b/src/osrmgeofilter.cpp index a312530..94bcca1 100644 --- a/src/osrmgeofilter.cpp +++ b/src/osrmgeofilter.cpp @@ -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);