correctly read osm_max_osm_station_distance, use default of 10 meters
This commit is contained in:
parent
e402f19cdb
commit
cdbfb0966d
3 changed files with 3 additions and 12 deletions
|
@ -750,10 +750,6 @@ osm_max_snap_distance: 100
|
||||||
|
|
||||||
osm_max_snap_level: 5
|
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
|
# sorted by priority, first found attr will be taken
|
||||||
osm_station_name_attrs:
|
osm_station_name_attrs:
|
||||||
name
|
name
|
||||||
|
|
|
@ -267,12 +267,9 @@ void MotConfigReader::parse(const std::vector<std::string>& paths,
|
||||||
|
|
||||||
if (p.hasKey(secStr, "osm_max_osm_station_distance")) {
|
if (p.hasKey(secStr, "osm_max_osm_station_distance")) {
|
||||||
double ref = p.getDouble(secStr, "osm_max_osm_station_distance");
|
double ref = p.getDouble(secStr, "osm_max_osm_station_distance");
|
||||||
cfg.osmBuildOpts.maxOsmStationDistances.push_back(fmin(5, ref));
|
cfg.osmBuildOpts.maxOsmStationDistances.push_back(ref);
|
||||||
for (double i = 10; i < ref + 1; i += 10) {
|
|
||||||
cfg.osmBuildOpts.maxOsmStationDistances.push_back(i);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
cfg.osmBuildOpts.maxOsmStationDistances.push_back(5);
|
cfg.osmBuildOpts.maxOsmStationDistances.push_back(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p.hasKey(secStr, "osm_max_node_block_distance")) {
|
if (p.hasKey(secStr, "osm_max_node_block_distance")) {
|
||||||
|
|
|
@ -27,8 +27,6 @@ using util::geo::output::GeoJsonOutput;
|
||||||
double Collector::add(const Trip* oldT, const Shape* oldS, const Trip* newT,
|
double Collector::add(const Trip* oldT, const Shape* oldS, const Trip* newT,
|
||||||
const Shape* newS) {
|
const Shape* newS) {
|
||||||
// This adds a new trip with a new shape to our evaluation.
|
// This adds a new trip with a new shape to our evaluation.
|
||||||
// if (oldT->getId() != "pse-a779ac00") return 0;
|
|
||||||
|
|
||||||
_trips++;
|
_trips++;
|
||||||
|
|
||||||
if (!oldS) {
|
if (!oldS) {
|
||||||
|
@ -213,7 +211,7 @@ std::vector<LINE> Collector::segmentize(
|
||||||
lastP = shape.front();
|
lastP = shape.front();
|
||||||
} else {
|
} else {
|
||||||
double progr = (cuts[0] - dists[to - 1]) / (dists[to] - dists[to - 1]);
|
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.setX(lastP.getX() + progr * (shape[to].getX() - shape[to-1].getX()));
|
||||||
lastP.setY(lastP.getY() + progr * (shape[to].getY() - shape[to-1].getY()));
|
lastP.setY(lastP.getY() + progr * (shape[to].getY() - shape[to-1].getY()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue