Skip to content

Commit

Permalink
Merge branch 'master' of github.com:felixguendling/open-street-router
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Jun 7, 2024
2 parents d21834a + a913b4a commit 3e17355
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/osr/routing/profiles/bike.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ struct bike {
static constexpr cost_t way_cost(way_properties const e,
direction,
std::uint16_t const dist) {
if (e.is_foot_accessible()) {
if (e.is_bike_accessible()) {
return static_cast<cost_t>(std::round(dist / 1.2F));
} else {
return kInfeasible;
}
}

static constexpr cost_t node_cost(node_properties const n) {
return (n.is_walk_accessible() ? (n.is_elevator_ ? 90U : 0U) : kInfeasible);
return n.is_bike_accessible() ? 0U : kInfeasible;
}
};

Expand Down
3 changes: 2 additions & 1 deletion include/osr/routing/profiles/foot.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ struct foot {
static constexpr cost_t way_cost(way_properties const e,
direction,
std::uint16_t const dist) {
if (e.is_foot_accessible() && (!IsWheelchair || !e.is_steps())) {
if ((e.is_foot_accessible() || e.is_bike_accessible()) &&
(!IsWheelchair || !e.is_steps())) {
return static_cast<cost_t>(std::round(dist / 1.2F));
} else {
return kInfeasible;
Expand Down
2 changes: 2 additions & 0 deletions src/extract.cc
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,8 @@ void extract(fs::path const& in, fs::path const& out) {

w.add_restriction(r);

utl::sort(w.r_->multi_level_elevators_);

w.r_->write(out);
}

Expand Down

0 comments on commit 3e17355

Please sign in to comment.