Skip to content

Commit

Permalink
OverlappingEdgeCheck Pedestrian Area Definition (osmlab#638)
Browse files Browse the repository at this point in the history
* bug fix: osmlab#637

* spotless
  • Loading branch information
vladlemberg authored Dec 8, 2021
1 parent 63523b1 commit e7416af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ protected List<String> getFallbackInstructions()
private boolean edgeIsArea(final Edge edge)
{
return (Validators.isOfType(edge, HighwayTag.class, HighwayTag.PEDESTRIAN)
|| Validators.isOfType(edge, HighwayTag.class, HighwayTag.FOOTWAY)
|| Validators.isOfType(edge, ManMadeTag.class, ManMadeTag.PIER))
&& (AREA_YES_TAG.test(edge) || CommonMethods.isClosedWay(edge))
|| (Validators.isOfType(edge, HighwayTag.class, HighwayTag.SERVICE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,15 @@ public class OverlappingEdgeCheckTestRule extends CoreTestRule
private Atlas pedestrianAreaOverlapPedestrianAreaClosedWayAtlas;

@TestAtlas(nodes = { @Node(coordinates = @Loc(value = ONE)),
@Node(coordinates = @Loc(value = TWO)),
@Node(coordinates = @Loc(value = THREE)) }, edges = {
@Node(coordinates = @Loc(value = TWO)), @Node(coordinates = @Loc(value = THREE)),
@Node(coordinates = @Loc(value = FOUR)), }, edges = {
@Edge(id = "521118537000000", coordinates = { @Loc(value = ONE),
@Loc(value = TWO), @Loc(value = THREE), @Loc(value = FOUR),
@Loc(value = ONE) }, tags = { "highway=pedestrian" }),
@Loc(value = ONE) }, tags = { "highway=pedestrian", "area=yes" }),
@Edge(id = "521118538000000", coordinates = { @Loc(value = TWO),
@Loc(value = THREE) }, tags = { "highway=pedestrian" }) })
@Loc(value = THREE) }, tags = { "highway=pedestrian" }),
@Edge(id = "521118539000000", coordinates = { @Loc(value = FOUR),
@Loc(value = ONE) }, tags = { "highway=footway" }) })
private Atlas pedestrianAreaOverlapPedestrianEdgeAtlas;

@TestAtlas(nodes = { @Node(coordinates = @Loc(value = ONE)),
Expand Down

0 comments on commit e7416af

Please sign in to comment.