From cdbfb0966dd203b02ce43a2f295607535fddb45e Mon Sep 17 00:00:00 2001 From: Patrick Brosi Date: Sat, 22 Jan 2022 23:01:00 +0100 Subject: [PATCH] correctly read osm_max_osm_station_distance, use default of 10 meters --- pfaedle.cfg | 4 ---- src/pfaedle/config/MotConfigReader.cpp | 7 ++----- src/shapevl/Collector.cpp | 4 +--- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/pfaedle.cfg b/pfaedle.cfg index 8a8d952..f31ddbc 100644 --- a/pfaedle.cfg +++ b/pfaedle.cfg @@ -750,10 +750,6 @@ osm_max_snap_distance: 100 osm_max_snap_level: 5 -# max distance between a snapped OSM station and is snap -# point to still be considered a "OSM station" -osm_max_osm_station_distance: 8.0 - # sorted by priority, first found attr will be taken osm_station_name_attrs: name diff --git a/src/pfaedle/config/MotConfigReader.cpp b/src/pfaedle/config/MotConfigReader.cpp index 7ad16ff..8a26c7f 100644 --- a/src/pfaedle/config/MotConfigReader.cpp +++ b/src/pfaedle/config/MotConfigReader.cpp @@ -267,12 +267,9 @@ void MotConfigReader::parse(const std::vector& paths, if (p.hasKey(secStr, "osm_max_osm_station_distance")) { double ref = p.getDouble(secStr, "osm_max_osm_station_distance"); - cfg.osmBuildOpts.maxOsmStationDistances.push_back(fmin(5, ref)); - for (double i = 10; i < ref + 1; i += 10) { - cfg.osmBuildOpts.maxOsmStationDistances.push_back(i); - } + cfg.osmBuildOpts.maxOsmStationDistances.push_back(ref); } else { - cfg.osmBuildOpts.maxOsmStationDistances.push_back(5); + cfg.osmBuildOpts.maxOsmStationDistances.push_back(10); } if (p.hasKey(secStr, "osm_max_node_block_distance")) { diff --git a/src/shapevl/Collector.cpp b/src/shapevl/Collector.cpp index d8f8c28..071fed9 100644 --- a/src/shapevl/Collector.cpp +++ b/src/shapevl/Collector.cpp @@ -27,8 +27,6 @@ using util::geo::output::GeoJsonOutput; double Collector::add(const Trip* oldT, const Shape* oldS, const Trip* newT, const Shape* newS) { // This adds a new trip with a new shape to our evaluation. - // if (oldT->getId() != "pse-a779ac00") return 0; - _trips++; if (!oldS) { @@ -213,7 +211,7 @@ std::vector Collector::segmentize( lastP = shape.front(); } else { double progr = (cuts[0] - dists[to - 1]) / (dists[to] - dists[to - 1]); - auto lastP = shape[to - 1]; + lastP = shape[to - 1]; lastP.setX(lastP.getX() + progr * (shape[to].getX() - shape[to-1].getX())); lastP.setY(lastP.getY() + progr * (shape[to].getY() - shape[to-1].getY())); }