Class SimilarTagValueCheck

  • All Implemented Interfaces:
    java.io.Serializable, Check

    public class SimilarTagValueCheck
    extends BaseCheck<java.lang.Long>
    This check looks for tags with multiple values that are duplicates or values are similar that contain a typo. Configurables: "value.length.min": Minimum length an individual value must be to be considered for inspection, value.length >= min. "similarity.threshold.min": Minimum edit distance between two values to be add to the flag where a value of 0 is used to include duplicates, value >= min. "similarity.threshold.max": Maximum edit distance between two values to be add to the flag, value <= max. "filter.commonSimilars": values that can commonly be found together validly on a tag that are similar but with no action needed to be taken. "filter.tags": tags that commonly have values that are duplicates/similars that are valid. "filter.tagsWithSubCategories": tags that contain one or many sub-categories that commonly have valid duplicate/similar values.
    See Also:
    Serialized Form
    • Constructor Detail

      • SimilarTagValueCheck

        public SimilarTagValueCheck​(org.openstreetmap.atlas.utilities.configuration.Configuration configuration)
        Parameters:
        configuration - the JSON configuration for this check
    • Method Detail

      • validCheckForObject

        public boolean validCheckForObject​(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object)
        Valid objects for this check objects with tags that contain multiple values.
        Parameters:
        object - the atlas object supplied by the Atlas-Checks framework for evaluation
        Returns:
        true if this object should be checked
      • flag

        protected java.util.Optional<CheckFlag> flag​(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object)
        This is the actual function that will check to see whether the object needs to be flagged.
        Specified by:
        flag in class BaseCheck<java.lang.Long>
        Parameters:
        object - the atlas object supplied by the Atlas-Checks framework for evaluation
        Returns:
        an optional CheckFlag object
      • getFallbackInstructions

        protected java.util.List<java.lang.String> getFallbackInstructions()
        Description copied from class: BaseCheck
        Method to implement for inheriting checks to return the default set of instruction formats that will be the last resort in BaseCheck.getLocalizedInstruction(int, Object[])
        Overrides:
        getFallbackInstructions in class BaseCheck<java.lang.Long>
        Returns:
        The set of instructions to fall back to if configuration results in none.