Skip to content

Commit 4842348

Browse files
committed
Soft threshold for latlon matching
1 parent 5cd41d0 commit 4842348

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/dsf/dsf.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
static constexpr uint8_t DSF_VERSION_MAJOR = 4;
88
static constexpr uint8_t DSF_VERSION_MINOR = 5;
9-
static constexpr uint8_t DSF_VERSION_PATCH = 4;
9+
static constexpr uint8_t DSF_VERSION_PATCH = 5;
1010

1111
static auto const DSF_VERSION =
1212
std::format("{}.{}.{}", DSF_VERSION_MAJOR, DSF_VERSION_MINOR, DSF_VERSION_PATCH);

src/dsf/mobility/RoadNetwork.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ namespace dsf::mobility {
155155
} else {
156156
auto const& [oldLon, oldLat] = pNode->geometry().value();
157157
auto const& [newLon, newLat] = point;
158-
if (std::abs(oldLat - newLat) > std::numeric_limits<double>::epsilon() ||
159-
std::abs(oldLon - newLon) > std::numeric_limits<double>::epsilon()) {
158+
if (std::abs(oldLat - newLat) > 1e-4 || std::abs(oldLon - newLon) > 1e-4) {
160159
spdlog::error(
161160
"Node {} geometry from properties file ({}, {}) do not match existing "
162161
"geometry ({}, {}). Keeping existing geometry.",

0 commit comments

Comments
 (0)