Skip to content

Commit

Permalink
Roundabout As Area InvalidTagging (#348)
Browse files Browse the repository at this point in the history
* correct version without merging conflicts

* spotless apply
  • Loading branch information
vladlemberg authored Aug 25, 2020
1 parent 2b682fa commit 17b99e7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,8 @@
"filters.resource.override": true,
"filters.classes.tags": [
["area","boundary->protected_area&protect_class->!"],
["relation","boundary->protected_area&protect_class->!"]
["relation","boundary->protected_area&protect_class->!"],
["edge","highway->motorway,trunk,primary,secondary,tertiary,unclassified,residential,service,motorway_link,trunk_link,primary_link,secondary_link,tertiary_link,living_street,track&junction->roundabout&area->*"]
],
"challenge": {
"description": "Tasks containing features with tags containing missing, conflicting, or incorrect values",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ public void invalidNodePointTest()
this.verifier.globallyVerify(flags -> Assert.assertEquals(2, flags.size()));
}

@Test
public void invalidRoundaboutAreaTest()
{
this.verifier.actual(this.setup.testAtlas(),
new InvalidTagsCheck(ConfigurationResolver.inlineConfiguration(
"{\"InvalidTagsCheck\":{\"filters.resource\": {\"override\": true,\"append\": false},\"filters.classes.tags\":[[\"edge\",\"highway->motorway,trunk,primary,secondary,tertiary,unclassified,residential,service,motorway_link,trunk_link,primary_link,secondary_link,tertiary_link,living_street,track&junction->roundabout&area->*\"]]}}")));
this.verifier.globallyVerify(flags -> Assert.assertEquals(
"1. OSM feature 5 has invalid tags.\n"
+ "2. Check the following tags for missing, conflicting, or incorrect values: [junction, area, highway]",
flags.get(0).getInstructions()));
}

@Test
public void validEmptyConfigTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@ public class InvalidTagsCheckTestRule extends CoreTestRule
@Edge(id = "5000001", coordinates = { @Loc(value = TEST_1),
@Loc(value = TEST_2) }, tags = { "route=ferry", "highway=ferry" }),
@Edge(id = "5000002", coordinates = { @Loc(value = TEST_1),
@Loc(value = TEST_2) }, tags = { "route=ferry", "highway=ferry" }) },
@Loc(value = TEST_2) }, tags = { "route=ferry", "highway=ferry" }),
@Edge(id = "5000003", coordinates = { @Loc(value = TEST_1),
@Loc(value = TEST_2) }, tags = { "junction=roundabout",
"highway=primary", "area=yes" }),
@Edge(id = "5000004", coordinates = { @Loc(value = TEST_1),
@Loc(value = TEST_2) }, tags = { "junction=roundabout",
"highway=secondary", "area=no" }) },
// lines
lines = { @Line(id = "6000000", coordinates = { @Loc(value = TEST_1),
@Loc(value = TEST_2) }, tags = { "construction=primary", "water=lake" }) },
Expand Down

0 comments on commit 17b99e7

Please sign in to comment.