diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmDatabase.java b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmDatabase.java index a560b96b2ab..e6727190b54 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmDatabase.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmDatabase.java @@ -253,7 +253,7 @@ public void addWay(OsmWay way) { applyLevelsForWay(way); - if (way.isAreaWay()) { + if (way.isRoutableArea()) { // this is an area that's a simple polygon. So we can just add it straight // to the areas, if it's not part of a relation. if (!areaWayIds.contains(wayId)) { diff --git a/application/src/main/java/org/opentripplanner/osm/model/OsmWay.java b/application/src/main/java/org/opentripplanner/osm/model/OsmWay.java index 31a0d8d9442..7b5fbe56748 100644 --- a/application/src/main/java/org/opentripplanner/osm/model/OsmWay.java +++ b/application/src/main/java/org/opentripplanner/osm/model/OsmWay.java @@ -14,13 +14,7 @@ public class OsmWay extends OsmWithTags { "backward", "reversible" ); - - private static final Set INDOOR_AREA_VALUES = Set.of( - "room", - "corridor", - "area" - ); - + private final TLongList nodes = new TLongArrayList(); public void addNodeRef(long nodeRef) { @@ -149,20 +143,20 @@ public boolean isBackwardEscalator() { * * An area can be specified as such, or be one by default as an amenity. */ - public boolean isAreaWay() { + public boolean isRoutableArea() { return ( !isTag("area", "no") && ( - isTag("area", "yes") || isParking() || isBikeParking() || isBoardingArea() || isIndoorArea() + isTag("area", "yes") || + isParking() || + isBikeParking() || + isBoardingArea() || + isIndoorRoutable() ) && getNodeRefs().size() > 2 ); } - public boolean isIndoorArea() { - return isOneOfTags("indoor", INDOOR_AREA_VALUES); - } - /** * Given a set of {@code permissions} check if it can really be applied to both directions * of the way and return the permissions for both cases. diff --git a/application/src/main/java/org/opentripplanner/osm/model/OsmWithTags.java b/application/src/main/java/org/opentripplanner/osm/model/OsmWithTags.java index 28dd1db9fae..cbaf4652b34 100644 --- a/application/src/main/java/org/opentripplanner/osm/model/OsmWithTags.java +++ b/application/src/main/java/org/opentripplanner/osm/model/OsmWithTags.java @@ -44,11 +44,8 @@ public class OsmWithTags { "bus_guideway", "escape" ); - - private static final Set INDOOR_ROUTABLE_VALUES = Set.of( - "corridor", - "area" - ); + + private static final Set INDOOR_ROUTABLE_VALUES = Set.of("corridor", "area"); private static final Set LEVEL_TAGS = Set.of("level", "layer"); private static final Set DEFAULT_LEVEL = Set.of("0");