Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions include/osr/extract/tags.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ struct tags {
}
};

auto circular = false;
auto oneway_defined = false;
for (auto const& t : o.tags()) {
switch (cista::hash(std::string_view{t.key()})) {
using namespace std::string_view_literals;
Expand All @@ -45,9 +47,13 @@ struct tags {
case cista::hash("railway"):
landuse_ |= t.value() == "station_area"sv;
break;
case cista::hash("oneway"): oneway_ |= t.value() == "yes"sv; break;
case cista::hash("oneway"):
oneway_defined = true;
oneway_ |= t.value() == "yes"sv;
break;
case cista::hash("junction"):
oneway_ |= t.value() == "roundabout"sv || t.value() == "circular"sv;
oneway_ |= t.value() == "roundabout"sv;
circular |= t.value() == "circular"sv;
break;
case cista::hash("oneway:bicycle"):
not_oneway_bike_ = t.value() == "no"sv;
Expand Down Expand Up @@ -142,6 +148,9 @@ struct tags {
case cista::hash("toll"): toll_ = t.value() == "yes"sv; break;
}
}
if (circular && !oneway_defined) {
oneway_ = true;
}
}

bool is_platform() const { return is_platform_ && !is_construction_; }
Expand Down
3 changes: 2 additions & 1 deletion include/osr/platforms.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,14 @@ struct platforms {
if (i == platform_idx_t::invalid()) {
return level_t{0.0F};
}
auto const& plref = platform_ref_.at(i);
return std::visit(
utl::overloaded{
[&](way_idx_t x) { return w.r_->way_properties_[x].from_level(); },
[&](node_idx_t x) {
return w.r_->node_properties_[x].from_level();
}},
to_ref(platform_ref_[i][0]));
to_ref(plref.at(0)));
}

template <typename Fn>
Expand Down
Loading