From 824b8ff7659508bba4f374a56bb107b66a4bfca6 Mon Sep 17 00:00:00 2001 From: Nelli Aydinyan <55819977+nelkapelmenka@users.noreply.github.com> Date: Wed, 11 Aug 2021 17:22:25 -0700 Subject: [PATCH] [new] StreetNameCheck (#581) * streenamecheck logic * streetnamecheck config * streetnamecheck push2 * indexoutofboundsexception * indexoutofbounds error for line 120 * fir flagging * nomenklature * renamed vars * DEU tagging of associated street * fixing deprecated * raw highwayaccesscheck * highwayaccesscheck code * streetnamecheck tests * updated config * added StreetNameCheck * deleted highwayaccesscheck * docker adjustments * build successful * suppressions * redo builds * substituted unicode and deleted suppresion * deleted fixme comment * updated pr * delete deprecated tag description * added a unit test with inlineconfig Co-authored-by: Nelli Aydinyan (INSIGHT GLOBAL INC) --- config/configuration.json | 13 + docs/available_checks.md | 1 + docs/checks/streetNameCheck.md | 40 +++ .../validation/tag/StreetNameCheck.java | 300 ++++++++++++++++ .../validation/tag/StreetNameCheckTest.java | 205 +++++++++++ .../tag/StreetNameCheckTestRule.java | 340 ++++++++++++++++++ 6 files changed, 899 insertions(+) create mode 100644 docs/checks/streetNameCheck.md create mode 100644 src/main/java/org/openstreetmap/atlas/checks/validation/tag/StreetNameCheck.java create mode 100644 src/test/java/org/openstreetmap/atlas/checks/validation/tag/StreetNameCheckTest.java create mode 100644 src/test/java/org/openstreetmap/atlas/checks/validation/tag/StreetNameCheckTestRule.java diff --git a/config/configuration.json b/config/configuration.json index 4bf77b983..466b2d15e 100644 --- a/config/configuration.json +++ b/config/configuration.json @@ -1112,6 +1112,19 @@ "tags":"highway" } }, + "StreetNameCheck": { + "check" : { + "countries" : ["AUT", "CHE", "DEU", "LIE"], + "containsValues" : [["strasse"],["straße"],["strasse"],["straße"]], + "notContainsValues" : [["strasser"],[],["strasser"],[]], + "tags" : [["ss"],["ß"],["ss"],["ß"]], + "correctTags" : [["ß"],["ss"],["ß"],["ss"]] + }, + "challenge": { + "description": "Checks if the countries specified above contain the values in their tags", + "instruction": "If modifying values in the config file, make sure the list indeces are all appropriate for each country" + } + }, "StreetNameIntegersOnlyCheck": { "name.keys.filter":["name","name:left","name:right"], "character.single.ignore": true, diff --git a/docs/available_checks.md b/docs/available_checks.md index 6188b79d9..ced1bba7d 100644 --- a/docs/available_checks.md +++ b/docs/available_checks.md @@ -98,6 +98,7 @@ This document is a list of tables with a description and link to documentation f | [RoadNameSpellingConsistencyCheck](checks/RoadNameSpellingConsistencyCheck.md) | The purpose of this check is to identify road segments that have a name Tag with a different spelling from that of other segments of the same road. This check is primarily meant to catch small errors in spelling, such as a missing letter, letter accent mixups, or capitalization errors. | | [SimilarTagValueCheck](checks/SimilarTagValueCheck.md) | The purpose of this check is to identify tags whose values are either duplicates or similar enough to warrant someone to look at them. | | ShortNameCheck | The short name check will validate that any and all names contain at least 2 letters in the name. | +| [StreetNameCheck](checks/streetNameCheck.md) |This check looks for "ss" or "ß" in street_name or name tags in AUT, CHE, DEU and LIE. | | [StreetNameIntegersOnlyCheck](checks/streetNameIntegersOnlyCheck.md) | The purpose of this check is to identify streets whose names contain integers only. | | [TollValidationCheck](checks/tollValidationCheck.md) | The purpose of this check is to identify ways that need to have their toll tags investigated/added/removed. | [TunnelBridgeHeightLimitCheck](checks/tunnelBridgeHeightLimitCheck.md) | The purpose of this check is to identify roads with limited vertical clearance which do not have a maxheight tag. | diff --git a/docs/checks/streetNameCheck.md b/docs/checks/streetNameCheck.md new file mode 100644 index 000000000..0e87bcd06 --- /dev/null +++ b/docs/checks/streetNameCheck.md @@ -0,0 +1,40 @@ +# StreetNameCheck + +#### Description +This check flags all the objects (Nodes, Ways and Relations) with "ss" or "ß" found in objects. + +#### Configurables +All these variables are lists and correspond to each other with their indeces. For example, if you are looking to add a +country to the list at index 4, then all the other values for that country have to be added to the same index. If there +are no elements to put, then add an empty list "[]". +- ***countries*** a list of the countries where the check needs to flag items +- ***containsValues*** a list of values that we are looking for in the name or street_name tags +- ***notContainsValues*** a list of values that mustn't be flagged in this check +- ***tags*** what specific value we are looking at for "containsValue". These do not affect code. +- ***correctTags*** the proper value that needs to be substituted in. + +#### Live Examples + +1. [Way:44446981](https://www.openstreetmap.org/way/44446981) in AUT the way has a name that contains the value "Strasse". +2. [Way:168119181](https://www.openstreetmap.org/way/168119181) in LIE the way has a name that contains the value "Straße" + +#### Code Review +This check evaluates [Nodes](https://github.com/osmlab/atlas/blob/dev/src/main/java/org/openstreetmap/atlas/geography/atlas/items/Node.java) and +[Edges](https://github.com/osmlab/atlas/blob/dev/src/main/java/org/openstreetmap/atlas/geography/atlas/items/Edge.java), and +[Relations](https://github.com/osmlab/atlas/blob/dev/src/main/java/org/openstreetmap/atlas/geography/atlas/items/Relation.java). +It flags the object that contain the values that are provided in the configuration.json file. + +##### Validating the Object +We first validate that the incoming object is: +* Hasn't been flagged previously +* A Way (Main Edge), a Node or a Relation + + +##### Flagging the Object +* The object has a name or street_name tag that contain the values provided in the containsValues variables in the config file. + +##### Not flagging the Object +* The object contains a containsValue variables but in addition contains the notContainsValue variable. + + +To learn more about the code, please look at the comments in the source code for the check: [StreetNameCheck.java](../../src/main/java/org/openstreetmap/atlas/checks/validation/tag/StreetNameCheck.java) diff --git a/src/main/java/org/openstreetmap/atlas/checks/validation/tag/StreetNameCheck.java b/src/main/java/org/openstreetmap/atlas/checks/validation/tag/StreetNameCheck.java new file mode 100644 index 000000000..1236686cb --- /dev/null +++ b/src/main/java/org/openstreetmap/atlas/checks/validation/tag/StreetNameCheck.java @@ -0,0 +1,300 @@ +package org.openstreetmap.atlas.checks.validation.tag; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +import org.openstreetmap.atlas.checks.base.BaseCheck; +import org.openstreetmap.atlas.checks.flag.CheckFlag; +import org.openstreetmap.atlas.geography.atlas.items.AtlasObject; +import org.openstreetmap.atlas.geography.atlas.items.Edge; +import org.openstreetmap.atlas.geography.atlas.items.Node; +import org.openstreetmap.atlas.geography.atlas.items.Relation; +import org.openstreetmap.atlas.geography.atlas.walker.OsmWayWalker; +import org.openstreetmap.atlas.tags.AddressStreetTag; +import org.openstreetmap.atlas.tags.ISOCountryTag; +import org.openstreetmap.atlas.tags.names.NameTag; +import org.openstreetmap.atlas.utilities.configuration.Configuration; + +/** + * Flags different values "ss" or "ß" for each country specified. Config file contains all the tags + * required to tag or not to tag specified for each country. The check looks at the object's ISO + * code and then pulls all the needed tags for that country from configuration.json . + * + * @author v-naydinyan + */ +public class StreetNameCheck extends BaseCheck +{ + + /** + * The object of class CountryInfo contains all the tags and values needed to be flagged for the + * object. + */ + class CountryInfo + { + private List tagContains; + private List tagNotContains; + private List tagValues; + private List correctValues; + + CountryInfo(final List contains, final List notContains, + final List tags, final List correctTags) + { + this.tagContains = contains; + this.tagNotContains = notContains; + this.tagValues = tags; + this.correctValues = correctTags; + } + + public List getCorrectValues() + { + return this.correctValues; + } + + public List getTagContains() + { + return this.tagContains; + } + + public List getTagNotContains() + { + return this.tagNotContains; + } + + public List getTagValues() + { + return this.tagValues; + } + } + + private static final List ALL_COUNTRIES_ISO_DEFAULT = List.of("AUT", "CHE", "DEU", + "LIE"); + private static final List> ALL_VALUES_TO_FLAG_DEFAULT = List.of(List.of("strasse"), + List.of("straße"), List.of("strasse"), List.of("straße")); + private static final List> ALL_VALUES_NOT_FLAG_DEFAULT = List + .of(List.of("strasser"), List.of(), List.of("strasser"), List.of()); + private static final List> ALL_ITEMS_TO_FLAG_DEFAULT = List.of(List.of("ss"), + List.of("ß"), List.of("ss"), List.of("ß")); + private static final List> ALL_CORRECT_ITEMS_TO_SUBSTITUTE = List.of(List.of("ß"), + List.of("ss"), List.of("ß"), List.of("ss")); + + private static final String CONTAINS_VALUE_INSTRUCTION = "The name of the object contains the value {0}. Please substitute it with an appropriate value {1}."; + private static final List FALLBACK_INSTRUCTIONS = Arrays + .asList(CONTAINS_VALUE_INSTRUCTION); + + private final List allCountriesIsoConfig; + private final List> allValuesToFlagConfig; + private final List> allValuesNotFlagConfig; + private final List> allItemsToFlagConfig; + private final List> allCorrectValuesToSubstitute; + + private static final long serialVersionUID = 3579562381907303707L; + + /** + * The default constructor that must be supplied. The Atlas Checks framework will generate the + * checks with this constructor, supplying a configuration that can be used to adjust any + * parameters that the check uses during operation. + * + * @param configuration + * the JSON configuration for this check + */ + public StreetNameCheck(final Configuration configuration) + { + super(configuration); + + this.allCountriesIsoConfig = this.configurationValue(configuration, "check.countries", + ALL_COUNTRIES_ISO_DEFAULT); + this.allValuesToFlagConfig = this.configurationValue(configuration, "check.containsValues", + ALL_VALUES_TO_FLAG_DEFAULT); + this.allValuesNotFlagConfig = this.configurationValue(configuration, + "check.notContainsValues", ALL_VALUES_NOT_FLAG_DEFAULT); + this.allItemsToFlagConfig = this.configurationValue(configuration, "check.tags", + ALL_ITEMS_TO_FLAG_DEFAULT); + this.allCorrectValuesToSubstitute = this.configurationValue(configuration, + "check.correctTags", ALL_CORRECT_ITEMS_TO_SUBSTITUTE); + } + + /** + * This function will validate if the supplied atlas object is valid for the check. The function + * checks that the object is of type Node, Relation or Way (only include MainEdge) and that is + * has not been flagged already. + * + * @param object + * the atlas object supplied by the Atlas-Checks framework for evaluation + * @return {@code true} if this object should be checked + */ + @Override + public boolean validCheckForObject(final AtlasObject object) + { + // Checks that the object is in the ISO list and is Node, Edge or Relation + return !this.isFlagged(object.getOsmIdentifier()) && (object instanceof Node + || (object instanceof Edge && ((Edge) object).isMainEdge()) + || object instanceof Relation); + } + + /** + * The function makes sure that the edges are flagged as ways. credit: Brian Jorgenson + */ + @Override + protected CheckFlag createFlag(final AtlasObject object, final String instruction) + { + if (object instanceof Edge) + { + return super.createFlag(new OsmWayWalker((Edge) object).collectEdges(), instruction); + } + return super.createFlag(object, instruction); + } + + /** + * This is the actual function that will check to see whether the object needs to be flagged. + * + * @param object + * the atlas object supplied by the Atlas-Checks framework for evaluation + * @return an optional {@link CheckFlag} object that contains that values in the tag that need + * to be flagged + */ + @Override + protected Optional flag(final AtlasObject object) + { + // a list of that contains all important tags for the object's ISO. + final var countryInfo = this.createCountryInfo(object); + + if (countryInfo != null) + { + final ArrayList> allValuesFoundInObject = this + .objectContainsValues(object, countryInfo); + this.markAsFlagged(object.getOsmIdentifier()); + + // the item contains a flagged tag but does not contain a tag that isn't to be flagged + if (!allValuesFoundInObject.get(0).isEmpty() && allValuesFoundInObject.get(1).isEmpty()) + { + return Optional.of(this.createFlag(object, this.getLocalizedInstruction(0, + countryInfo.getTagValues(), countryInfo.getCorrectValues()))); + } + } + return Optional.empty(); + } + + @Override + protected List getFallbackInstructions() + { + return FALLBACK_INSTRUCTIONS; + } + + /** + * @param object + * the atlas object supplied by the Atlas-Checks framework for evaluation + * @return an object of class CountryInfo if the index of the object is in the config file + */ + private CountryInfo createCountryInfo(final AtlasObject object) + { + final int objectIndex; + final String isoTag = object.tag(ISOCountryTag.KEY); + if (isoTag != null) + { + objectIndex = this.allCountriesIsoConfig.indexOf(object.tag(ISOCountryTag.KEY)); + } + else + { + objectIndex = -1; + } + if (objectIndex < 0) + { + return null; + } + return new CountryInfo(this.allValuesToFlagConfig.get(objectIndex), + this.allValuesNotFlagConfig.get(objectIndex), + this.allItemsToFlagConfig.get(objectIndex), + this.allCorrectValuesToSubstitute.get(objectIndex)); + } + + /** + * @param streetTag + * the street tag of the object, null if doesn't exist + * @param nameTag + * the name tag of the object, null if doesn't exist + * @param containTags + * the list of values that need to be flagged + * @return an ArrayList of Strings, tags that need to be flagged found in object, otherwise + * returns null + */ + private ArrayList findValuesToFlag(final String streetTag, final String nameTag, + final List containTags) + { + final ArrayList valuesToFlagInObject = new ArrayList<>(); + if (!containTags.isEmpty() && (streetTag != null || nameTag != null)) + { + containTags.forEach(tag -> + { + if ((streetTag != null && streetTag.toLowerCase().contains(String.valueOf(tag))) + || (nameTag != null && nameTag.toLowerCase().contains(String.valueOf(tag)))) + { + valuesToFlagInObject.add(String.valueOf(tag)); + } + }); + } + + return valuesToFlagInObject; + + } + + /** + * @param streetTag + * the street tag of the object, null if doesn't exist + * @param nameTag + * the name tag of the object, null if doesn't exist + * @param notContainTags + * list of values that are not to be flagged + * @return an ArrayList of Strings, tags that don't need to be flagged found in object, + * otherwise returns null + */ + private ArrayList findValuesToNotFlag(final String streetTag, final String nameTag, + final List notContainTags) + { + final ArrayList valuesToNotFlagInObject = new ArrayList<>(); + if (!notContainTags.isEmpty() && (streetTag != null || nameTag != null)) + { + notContainTags.forEach(tag -> + { + if ((streetTag != null && streetTag.toLowerCase().contains(String.valueOf(tag))) + || (nameTag != null && nameTag.toLowerCase().contains(String.valueOf(tag)))) + { + valuesToNotFlagInObject.add(String.valueOf(tag)); + } + }); + } + + return valuesToNotFlagInObject; + + } + + /** + * This is the actual function that will check to see whether the object needs to be flagged. + * + * @param object + * the atlas object supplied by the Atlas-Checks framework for evaluation + * @param countryInfo + * the countryInfo object that contains all the values needed for flagging + * @return an array that contains tags that have been found at their appropriate indeces: 0 = + * contains tag, 1 = not contains tag, 2 = tag is deprecated + */ + private ArrayList> objectContainsValues(final AtlasObject object, + final CountryInfo countryInfo) + { + final Map tags = object.getTags(); + final String streetTag = tags.get(AddressStreetTag.KEY); + final String nameTag = tags.get(NameTag.KEY); + + final List valuesToFlag = countryInfo.getTagContains(); + final List valuesToNotFlag = countryInfo.getTagNotContains(); + + final ArrayList> contains = new ArrayList<>(2); + contains.add(0, this.findValuesToFlag(streetTag, nameTag, valuesToFlag)); + contains.add(1, this.findValuesToNotFlag(streetTag, nameTag, valuesToNotFlag)); + + return contains; + } + +} diff --git a/src/test/java/org/openstreetmap/atlas/checks/validation/tag/StreetNameCheckTest.java b/src/test/java/org/openstreetmap/atlas/checks/validation/tag/StreetNameCheckTest.java new file mode 100644 index 000000000..2c8bbcf52 --- /dev/null +++ b/src/test/java/org/openstreetmap/atlas/checks/validation/tag/StreetNameCheckTest.java @@ -0,0 +1,205 @@ +package org.openstreetmap.atlas.checks.validation.tag; + +import org.junit.Rule; +import org.junit.Test; +import org.openstreetmap.atlas.checks.configuration.ConfigurationResolver; +import org.openstreetmap.atlas.checks.validation.verifier.ConsumerBasedExpectedCheckVerifier; + +/** + * Tests for {@link StreetNameCheck} + * + * @author v-naydinyan + */ +public class StreetNameCheckTest +{ + @Rule + public StreetNameCheckTestRule setup = new StreetNameCheckTestRule(); + + @Rule + public ConsumerBasedExpectedCheckVerifier verifier = new ConsumerBasedExpectedCheckVerifier(); + + private final StreetNameCheck check = new StreetNameCheck( + ConfigurationResolver.emptyConfiguration()); + + @Test + public void falsePositiveAutNodeInvalidValue() + { + this.verifier.actual(this.setup.falsePositiveAutNodeInvalidValue(), this.check); + this.verifier.verifyEmpty(); + } + + @Test + public void falsePositiveAutRelationInvalidValue() + { + this.verifier.actual(this.setup.falsePositiveAutRelationInvalidValue(), this.check); + this.verifier.verifyEmpty(); + } + + @Test + public void falsePositiveAutWayInvalidValue() + { + this.verifier.actual(this.setup.falsePositiveAutWayInvalidTag(), this.check); + this.verifier.verifyEmpty(); + } + + @Test + public void falsePositiveCheNodeInvalidValue() + { + this.verifier.actual(this.setup.falsePositiveCheNodeInvalidValue(), this.check); + this.verifier.verifyEmpty(); + } + + @Test + public void falsePositiveCheRelationInvalidValue() + { + this.verifier.actual(this.setup.falsePositiveCheRelationInvalidValue(), this.check); + this.verifier.verifyEmpty(); + } + + @Test + public void falsePositiveCheWayInvalidValue() + { + this.verifier.actual(this.setup.falsePositiveCheWayInvalidValue(), this.check); + this.verifier.verifyEmpty(); + } + + @Test + public void falsePositiveDeuNodeInvalidValue() + { + this.verifier.actual(this.setup.falsePositiveDeuNodeInvalidValue(), this.check); + this.verifier.verifyEmpty(); + } + + @Test + public void falsePositiveDeuRelationInvalidValue() + { + this.verifier.actual(this.setup.falsePositiveDeuRelationInvalidValue(), this.check); + this.verifier.verifyEmpty(); + } + + @Test + public void falsePositiveDeuWayInvalidValue() + { + this.verifier.actual(this.setup.falsePositiveDeuWayInvalidValue(), this.check); + this.verifier.verifyEmpty(); + } + + @Test + public void falsePositiveLieNodeInvalidValue() + { + this.verifier.actual(this.setup.falsePositiveLieNodeInvalidValue(), this.check); + this.verifier.verifyEmpty(); + } + + @Test + public void falsePositiveLieRelationInvalidValue() + { + this.verifier.actual(this.setup.falsePositiveLieRelationInvalidValue(), this.check); + this.verifier.verifyEmpty(); + } + + @Test + public void falsePositiveLieWayInvalidValue() + { + this.verifier.actual(this.setup.falsePositiveLieWayInvalidValue(), this.check); + this.verifier.verifyEmpty(); + } + + @Test + public void truePositiveAutNodeInvalidValue() + { + this.verifier.actual(this.setup.truePositiveAutNodeInvalidValue(), this.check); + this.verifier.verifyExpectedSize(1); + } + + @Test + public void truePositiveAutRelationInvalidValue() + { + this.verifier.actual(this.setup.truePositiveAutRelationInvalidValue(), this.check); + this.verifier.verifyExpectedSize(1); + } + + @Test + public void truePositiveAutWayInvalidValue() + { + this.verifier.actual(this.setup.truePositiveAutWayInvalidValue(), this.check); + this.verifier.verifyExpectedSize(1); + } + + @Test + public void truePositiveCheNodeInvalidValue() + { + this.verifier.actual(this.setup.truePositiveCheNodeInvalidValue(), this.check); + this.verifier.verifyExpectedSize(1); + } + + @Test + public void truePositiveCheRelationInvalidValue() + { + this.verifier.actual(this.setup.truePositiveCheRelationInvalidValue(), this.check); + this.verifier.verifyExpectedSize(1); + } + + @Test + public void truePositiveCheWayInvalidValue() + { + this.verifier.actual(this.setup.truePositiveCheWayInvalidValue(), this.check); + this.verifier.verifyExpectedSize(1); + } + + @Test + public void truePositiveDeuNodeInvalidValue() + { + this.verifier.actual(this.setup.truePositiveDeuNodeInvalidValue(), this.check); + this.verifier.verifyExpectedSize(1); + } + + @Test + public void truePositiveDeuRelationInvalidValue() + { + this.verifier.actual(this.setup.truePositiveDeuRelationInvalidValue(), this.check); + this.verifier.verifyExpectedSize(1); + } + + @Test + public void truePositiveDeuWayInvalidValue() + { + this.verifier.actual(this.setup.truePositiveDeuWayInvalidValue(), this.check); + this.verifier.verifyExpectedSize(1); + } + + @Test + public void truePositiveLieNodeInvalidValue() + { + this.verifier.actual(this.setup.truePositiveLieNodeInvalidValue(), this.check); + this.verifier.verifyExpectedSize(1); + } + + @Test + public void truePositiveLieRelationInvalidValue() + { + this.verifier.actual(this.setup.truePositiveLieRelationInvalidValue(), this.check); + this.verifier.verifyExpectedSize(1); + } + + @Test + public void truePositiveLieWayInvalidValue() + { + this.verifier.actual(this.setup.truePositiveLieWayInvalidValue(), this.check); + this.verifier.verifyExpectedSize(1); + } + + /** + * This test removes the notContainsValue for a German configuration. The item that was + * falsePositive is now truePositive. + */ + @Test + public void truePositiveTestWithInlineConfig() + { + final StreetNameCheck thisTest = new StreetNameCheck( + ConfigurationResolver.inlineConfiguration( + "{\"StreetNameCheck\":{\"check\":{\"countries\":[\"DEU\"], \"containsValues\":[[\"strasse\"]], \"notContainsValues\":[[]]}}}")); + this.verifier.actual(this.setup.falsePositiveDeuNodeInvalidValue(), thisTest); + this.verifier.verifyExpectedSize(1); + } +} diff --git a/src/test/java/org/openstreetmap/atlas/checks/validation/tag/StreetNameCheckTestRule.java b/src/test/java/org/openstreetmap/atlas/checks/validation/tag/StreetNameCheckTestRule.java new file mode 100644 index 000000000..202ad4236 --- /dev/null +++ b/src/test/java/org/openstreetmap/atlas/checks/validation/tag/StreetNameCheckTestRule.java @@ -0,0 +1,340 @@ +package org.openstreetmap.atlas.checks.validation.tag; + +import org.openstreetmap.atlas.geography.atlas.Atlas; +import org.openstreetmap.atlas.utilities.testing.CoreTestRule; +import org.openstreetmap.atlas.utilities.testing.TestAtlas; +import org.openstreetmap.atlas.utilities.testing.TestAtlas.Edge; +import org.openstreetmap.atlas.utilities.testing.TestAtlas.Loc; +import org.openstreetmap.atlas.utilities.testing.TestAtlas.Node; +import org.openstreetmap.atlas.utilities.testing.TestAtlas.Relation; +import org.openstreetmap.atlas.utilities.testing.TestAtlas.Relation.Member; + +/** + * Tests for {@link StreetNameCheck} + * + * @author v-naydinyan + */ +public class StreetNameCheckTestRule extends CoreTestRule +{ + + private static final String WAY1_NODE1 = "40.9130354, 29.4700719"; + private static final String WAY1_NODE2 = "40.9123887, 29.4698597"; + + @TestAtlas(nodes = { @Node(id = "100001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "100002", coordinates = @Loc(value = WAY1_NODE2), tags = { + "iso_country_code=AUT", "name=Peter-Strasser-Platz" }) }, edges = { + @Edge(id = "100003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }) }) + private Atlas falsePositiveAutNodeInvalidValue; + + @TestAtlas(nodes = { @Node(id = "300001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "300002", coordinates = @Loc(value = WAY1_NODE2)) }, edges = { + @Edge(id = "300003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }) }, relations = { + @Relation(id = "300004", members = { + @Member(id = "300001", type = "node", role = "any"), + @Member(id = "300003", type = "edge", role = "any") }, tags = { + "iso_country_code=AUT", + "name=Peter-Strasser-Platz" }) }) + private Atlas falsePositiveAutRelationInvalidValue; + + @TestAtlas(nodes = { @Node(id = "400001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "400002", coordinates = @Loc(value = WAY1_NODE2)) }, edges = { + @Edge(id = "400003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }, tags = { "iso_country_code=AUT", + "name=Peter-Strasser-Platz" }) }) + private Atlas falsePositiveAutWayInvalidValue; + + @TestAtlas(nodes = { @Node(id = "500001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "500002", coordinates = @Loc(value = WAY1_NODE2), tags = { + "iso_country_code=CHE", "name=Hauptstrasse" }) }, edges = { + @Edge(id = "500003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }) }) + private Atlas falsePositiveCheNodeInvalidValue; + + @TestAtlas(nodes = { @Node(id = "700001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "700002", coordinates = @Loc(value = WAY1_NODE2)) }, edges = { + @Edge(id = "700003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }) }, relations = { + @Relation(id = "700004", members = { + @Member(id = "700003", type = "edge", role = "any"), + @Member(id = "700002", type = "node", role = "any") }, tags = { + "iso_country_code=CHE", + "name=Hauptstrasse" }) }) + private Atlas falsePositiveCheRelationInvalidValue; + + @TestAtlas(nodes = { @Node(id = "800001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "800002", coordinates = @Loc(value = WAY1_NODE2)) }, edges = { + @Edge(id = "800003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }, tags = { "iso_country_code=CHE", + "name=Hauptstrasse" }) }) + private Atlas falsePositiveCheWayInvalidValue; + + @TestAtlas(nodes = { @Node(id = "900001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "900002", coordinates = @Loc(value = WAY1_NODE2), tags = { + "iso_country_code=DEU", "name=Peter-Strasser-Platz" }) }, edges = { + @Edge(id = "900003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }) }) + private Atlas falsePositiveDeuNodeInvalidValue; + + @TestAtlas(nodes = { @Node(id = "1100001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "1100002", coordinates = @Loc(value = WAY1_NODE2)) }, edges = { + @Edge(id = "1100003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }) }, relations = { + @Relation(id = "1100004", members = { + @Member(id = "1100003", type = "edge", role = "any"), + @Member(id = "1100002", type = "node", role = "any") }, tags = { + "iso_country_code=DEU", + "name=Peter-Strasser-Platz" }) }) + private Atlas falsePositiveDeuRelationInvalidValue; + + @TestAtlas(nodes = { @Node(id = "1200001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "1200002", coordinates = @Loc(value = WAY1_NODE2)) }, edges = { + @Edge(id = "1200003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }, tags = { "iso_country_code=DEU", + "name=Peter-Strasser-Platz" }) }) + private Atlas falsePositiveDeuWayInvalidValue; + + @TestAtlas(nodes = { @Node(id = "1300001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "1300002", coordinates = @Loc(value = WAY1_NODE2), tags = { + "iso_country_code=LIE", "name=Hauptstrasse" }) }, edges = { + @Edge(id = "1300003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }) }) + private Atlas falsePositiveLieNodeInvalidValue; + + @TestAtlas(nodes = { @Node(id = "1500001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "1500002", coordinates = @Loc(value = WAY1_NODE2)) }, edges = { + @Edge(id = "1500003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }) }, relations = { + @Relation(id = "1500004", members = { + @Member(id = "1500003", type = "edge", role = "any"), + @Member(id = "1500002", type = "node", role = "any") }, tags = { + "iso_country_code=LIE", + "name=Hauptstrasse" }) }) + private Atlas falsePositiveLieRelationInvalidValue; + + @TestAtlas(nodes = { @Node(id = "1600001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "1600002", coordinates = @Loc(value = WAY1_NODE2)) }, edges = { + @Edge(id = "1600002", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }, tags = { "iso_country_code=LIE", + "name=Hauptstrasse" }) }) + private Atlas falsePositiveLieWayInvalidValue; + + @TestAtlas(nodes = { @Node(id = "1700001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "1700002", coordinates = @Loc(value = WAY1_NODE2), tags = { + "iso_country_code=AUT", "name=Hauptstrasse" }) }, edges = { + @Edge(id = "1700003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }) }) + private Atlas truePositiveAutNodeInvalidValue; + + @TestAtlas(nodes = { @Node(id = "1800001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "1800002", coordinates = @Loc(value = WAY1_NODE2)) }, edges = { + @Edge(id = "1800003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }) }, relations = { + @Relation(id = "1800004", members = { + @Member(id = "1800003", type = "edge", role = "any"), + @Member(id = "1800002", type = "node", role = "any") }, tags = { + "iso_country_code=AUT", + "name=Hauptstrasse" }) }) + private Atlas truePositiveAutRelationInvalidValue; + + @TestAtlas(nodes = { @Node(id = "1900001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "1900002", coordinates = @Loc(value = WAY1_NODE2)) }, edges = { + @Edge(id = "1900003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }, tags = { "iso_country_code=AUT", + "name=Hauptstrasse" }) }) + private Atlas truePositiveAutWayInvalidValue; + + @TestAtlas(nodes = { @Node(id = "2000001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "2000002", coordinates = @Loc(value = WAY1_NODE2), tags = { + "iso_country_code=CHE", "name=Hauptstraße" // NOSONAR + }) }, edges = { @Edge(id = "2000003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }) }) + private Atlas truePositiveCheNodeInvalidValue; + + @TestAtlas(nodes = { @Node(id = "2100001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "2100002", coordinates = @Loc(value = WAY1_NODE2)) }, edges = { + @Edge(id = "2100003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }) }, relations = { + @Relation(id = "2100004", members = { + @Member(id = "2100003", type = "edge", role = "any"), + @Member(id = "2100002", type = "node", role = "any") }, tags = { + "iso_country_code=CHE", "name=Hauptstraße" }) }) + private Atlas truePositiveCheRelationInvalidValue; + + @TestAtlas(nodes = { @Node(id = "2200001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "2200002", coordinates = @Loc(value = WAY1_NODE2)) }, edges = { + @Edge(id = "2200003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }, tags = { "iso_country_code=CHE", + "name=Hauptstraße" }) }) + private Atlas truePositiveCheWayInvalidValue; + + @TestAtlas(nodes = { @Node(id = "2300001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "2300002", coordinates = @Loc(value = WAY1_NODE2), tags = { + "iso_country_code=DEU", "name=Hauptstrasse" }) }, edges = { + @Edge(id = "2300003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }) }) + private Atlas truePositiveDeuNodeInvalidValue; + + @TestAtlas(nodes = { @Node(id = "2500001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "2500002", coordinates = @Loc(value = WAY1_NODE2)) }, edges = { + @Edge(id = "2500003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }) }, relations = { + @Relation(id = "2500004", members = { + @Member(id = "2500003", type = "edge", role = "any"), + @Member(id = "2500002", type = "node", role = "any") }, tags = { + "iso_country_code=DEU", + "name=Hauptstrasse" }) }) + private Atlas truePositiveDeuRelationInvalidValue; + + @TestAtlas(nodes = { @Node(id = "2600001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "2600002", coordinates = @Loc(value = WAY1_NODE2)) }, edges = { + @Edge(id = "2600003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }, tags = { "iso_country_code=DEU", + "name=Hauptstrasse" }) }) + private Atlas truePositiveDeuWayInvalidValue; + + @TestAtlas(nodes = { @Node(id = "2700001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "2700002", coordinates = @Loc(value = WAY1_NODE2), tags = { + "iso_country_code=LIE", "name=Hauptstraße" }) }, edges = { + @Edge(id = "2700003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }) }) + private Atlas truePositiveLieNodeInvalidValue; + + @TestAtlas(nodes = { @Node(id = "2800001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "2800002", coordinates = @Loc(value = WAY1_NODE2)) }, edges = { + @Edge(id = "2800003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }) }, relations = { + @Relation(id = "2800004", members = { + @Member(id = "2800003", type = "edge", role = "any"), + @Member(id = "2800002", type = "node", role = "any") }, tags = { + "iso_country_code=LIE", "name=Hauptstraße" }) }) + private Atlas truePositiveLieRelationInvalidValue; + + @TestAtlas(nodes = { @Node(id = "2900001", coordinates = @Loc(value = WAY1_NODE1)), + @Node(id = "2900002", coordinates = @Loc(value = WAY1_NODE2)) }, edges = { + @Edge(id = "2900003", coordinates = { @Loc(value = WAY1_NODE1), + @Loc(value = WAY1_NODE2) }, tags = { "iso_country_code=LIE", + "name=Hauptstraße" }) }) + private Atlas truePositiveLieWayInvalidValue; + + public Atlas falsePositiveAutNodeInvalidValue() + { + return this.falsePositiveAutNodeInvalidValue; + } + + public Atlas falsePositiveAutRelationInvalidValue() + { + return this.falsePositiveAutRelationInvalidValue; + } + + public Atlas falsePositiveAutWayInvalidTag() + { + return this.falsePositiveAutWayInvalidValue; + } + + public Atlas falsePositiveCheNodeInvalidValue() + { + return this.falsePositiveCheNodeInvalidValue; + } + + public Atlas falsePositiveCheRelationInvalidValue() + { + return this.falsePositiveCheRelationInvalidValue; + } + + public Atlas falsePositiveCheWayInvalidValue() + { + return this.falsePositiveCheWayInvalidValue; + } + + public Atlas falsePositiveDeuNodeInvalidValue() + { + return this.falsePositiveDeuNodeInvalidValue; + } + + public Atlas falsePositiveDeuRelationInvalidValue() + { + return this.falsePositiveDeuRelationInvalidValue; + } + + public Atlas falsePositiveDeuWayInvalidValue() + { + return this.falsePositiveDeuWayInvalidValue; + } + + public Atlas falsePositiveLieNodeInvalidValue() + { + return this.falsePositiveLieNodeInvalidValue; + } + + public Atlas falsePositiveLieRelationInvalidValue() + { + return this.falsePositiveLieRelationInvalidValue; + } + + public Atlas falsePositiveLieWayInvalidValue() + { + return this.falsePositiveLieWayInvalidValue; + } + + public Atlas truePositiveAutNodeInvalidValue() + { + return this.truePositiveAutNodeInvalidValue; + } + + public Atlas truePositiveAutRelationInvalidValue() + { + return this.truePositiveAutRelationInvalidValue; + } + + public Atlas truePositiveAutWayInvalidValue() + { + return this.truePositiveAutWayInvalidValue; + } + + public Atlas truePositiveCheNodeInvalidValue() + { + return this.truePositiveCheNodeInvalidValue; + } + + public Atlas truePositiveCheRelationInvalidValue() + { + return this.truePositiveCheRelationInvalidValue; + } + + public Atlas truePositiveCheWayInvalidValue() + { + return this.truePositiveCheWayInvalidValue; + } + + public Atlas truePositiveDeuNodeInvalidValue() + { + return this.truePositiveDeuNodeInvalidValue; + } + + public Atlas truePositiveDeuRelationInvalidValue() + { + return this.truePositiveDeuRelationInvalidValue; + } + + public Atlas truePositiveDeuWayInvalidValue() + { + return this.truePositiveDeuWayInvalidValue; + } + + public Atlas truePositiveLieNodeInvalidValue() + { + return this.truePositiveLieNodeInvalidValue; + } + + public Atlas truePositiveLieRelationInvalidValue() + { + return this.truePositiveLieRelationInvalidValue; + } + + public Atlas truePositiveLieWayInvalidValue() + { + return this.truePositiveLieWayInvalidValue; + } +}