Skip to content

Commit

Permalink
Support OSM highway=razed tag. Fixes #2659
Browse files Browse the repository at this point in the history
  • Loading branch information
t2gran committed Oct 23, 2018
1 parent 0967dfd commit b7c2fbd
Showing 1 changed file with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,30 @@ public class OSMFilter {
* (as well as ways where all access is specifically forbidden to the public).
* http://wiki.openstreetmap.org/wiki/Tag:highway%3Dproposed
*/
public static boolean isWayRoutable(OSMWithTags way) {
if (!isOsmEntityRoutable(way))
static boolean isWayRoutable(OSMWithTags way) {
if (!isOsmEntityRoutable(way)) {
return false;
}

String highway = way.getTag("highway");
if (highway != null
&& (highway.equals("conveyer") || highway.equals("proposed")
|| highway.equals("construction") || highway.equals("raceway") || highway
.equals("unbuilt")))
return false;
if (highway != null) {
if(
highway.equals("conveyer") ||
highway.equals("proposed") ||
highway.equals("construction") ||
highway.equals("razed") ||
highway.equals("raceway") ||
highway.equals("unbuilt")
) {
return false;
}
}

if (way.isGeneralAccessDenied()) {
// There are exceptions.
return (way.isMotorcarExplicitlyAllowed() || way.isBicycleExplicitlyAllowed() || way
.isPedestrianExplicitlyAllowed() || way.isMotorVehicleExplicitlyAllowed());
}

return true;
}

Expand Down

0 comments on commit b7c2fbd

Please sign in to comment.