Class SnakeRoadCheck

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

    public class SnakeRoadCheck
    extends BaseCheck<java.lang.Long>
    This check flags edges that form Snake Roads. A Snake Road is defined as a road that should be split into two or more roads. An example of this is a residential road that weaves in and out of a neighborhood or multiple neighborhoods, where the correct behavior should have each road in a neighborhood be it's own separate way. The criteria we use to identify a snake road is:
    • 1) At some point, two consecutive Edges making up the Snake road must have a Heading difference of at least 60 degrees.
    • 2) The snake road must have at least 3L Edges
    • 3) At least one Edge making up the snake road should have a valence greater than 4L
    • 4) To be considered a snake road, you should either have no road name or have any connected ways that share the same name that you do. This is done to prevent flagging strange portions of highways that may exhibit the behavior of a snake road.
    See Also:
    Serialized Form
    • Constructor Detail

      • SnakeRoadCheck

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

      • validCheckForObject

        public boolean validCheckForObject​(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object)
        Description copied from interface: Check
        Checks to see whether the supplied object class type is valid for this particular check
        Parameters:
        object - The AtlasObject you are checking
        Returns:
        true if it is
      • flag

        protected java.util.Optional<CheckFlag> flag​(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object)
        Specified by:
        flag in class BaseCheck<java.lang.Long>
      • 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.