Skip to content

Commit

Permalink
Add highway=corridor to footway types (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbendebiene authored Mar 7, 2024
1 parent 6b24f11 commit a730c8f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/ppr/common/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ enum class street_type : std::uint8_t {
FOOTWAY,
PATH,
CYCLEWAY,
CORRIDOR,
BRIDLEWAY,
STAIRS,
ESCALATOR,
Expand Down
1 change: 1 addition & 0 deletions include/ppr/output/geojson/edge_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ void write_street_type(Writer& writer, street_type const type) {
case street_type::FOOTWAY: writer.String("footway"); break;
case street_type::PATH: writer.String("path"); break;
case street_type::CYCLEWAY: writer.String("cycleway"); break;
case street_type::CORRIDOR: writer.String("corridor"); break;
case street_type::BRIDLEWAY: writer.String("bridleway"); break;
case street_type::STAIRS: writer.String("stairs"); break;
case street_type::ESCALATOR: writer.String("escalator"); break;
Expand Down
1 change: 1 addition & 0 deletions src/backend/output/route_response.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ char const* street_type_str(street_type const street) {
case street_type::FOOTWAY: return "footway";
case street_type::PATH: return "path";
case street_type::CYCLEWAY: return "cycleway";
case street_type::CORRIDOR: return "corridor";
case street_type::BRIDLEWAY: return "bridleway";
case street_type::STAIRS: return "stairs";
case street_type::ESCALATOR: return "escalator";
Expand Down
4 changes: 3 additions & 1 deletion src/preprocessing/osm/way_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ bool is_footway(street_type const street, osmium::TagList const& tags) {
}
return street == street_type::TRACK || street == street_type::FOOTWAY ||
street == street_type::PATH || street == street_type::PEDESTRIAN ||
street == street_type::STAIRS;
street == street_type::STAIRS || street == street_type::CORRIDOR;
}

street_type get_street_type(char const* highway) {
Expand All @@ -55,6 +55,8 @@ street_type get_street_type(char const* highway) {
return street_type::PATH;
} else if (strcmp(highway, "cycleway") == 0) {
return street_type::CYCLEWAY;
} else if (strcmp(highway, "corridor") == 0) {
return street_type::CORRIDOR;
} else if (strcmp(highway, "bridleway") == 0) {
return street_type::BRIDLEWAY;
} else if (strcmp(highway, "tertiary") == 0 ||
Expand Down

0 comments on commit a730c8f

Please sign in to comment.