actually calculate distance instead of using .distance which is a timing value
This commit is contained in:
@@ -162,8 +162,12 @@ operator()(const NodeID, const EdgeID source_edge_id, Intersection intersection)
|
||||
return intersection;
|
||||
|
||||
// Threshold check, if the intersection is too far away, don't bother continuing
|
||||
const auto &next_road_data = node_based_graph.GetEdgeData(next_road.turn.eid);
|
||||
if (next_road_data.distance > MAX_SLIPROAD_THRESHOLD)
|
||||
const auto coordinate_extractor = intersection_generator.GetCoordinateExtractor();
|
||||
const auto next_road_length = util::coordinate_calculation::getLength(
|
||||
coordinate_extractor.GetForwardCoordinatesAlongRoad(
|
||||
node_based_graph.GetTarget(source_edge_id), next_road.turn.eid),
|
||||
&util::coordinate_calculation::haversineDistance);
|
||||
if (next_road_length > MAX_SLIPROAD_THRESHOLD)
|
||||
{
|
||||
return intersection;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user