Class RoundaboutClosedLoopCheck

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

    public class RoundaboutClosedLoopCheck
    extends BaseCheck<java.lang.Long>
    Flags roundabout edges that are either bidirectional or have a node with less than or equal to MINIMUM_VALENCE connections. See http://wiki.openstreetmap.org/wiki/Key:oneway for more information about one-way and roundabouts
    See Also:
    Serialized Form
    • Field Detail

      • ONE_WAY_INSTRUCTION

        public static final java.lang.String ONE_WAY_INSTRUCTION
        See Also:
        Constant Field Values
      • MINIMUM_VALENCE_INSTRUCTION

        public static final java.lang.String MINIMUM_VALENCE_INSTRUCTION
      • FALLBACK_INSTRUCTIONS

        public static final java.util.List<java.lang.String> FALLBACK_INSTRUCTIONS
    • Constructor Detail

      • RoundaboutClosedLoopCheck

        public RoundaboutClosedLoopCheck​(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)
        Validates if given AtlasObject is actually an Edge and is a roundabout and also corresponding OSM identifier shouldn't be flagged before (this is for avoiding duplicate flags)
        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)
        Flags an Edge if it is not one-way or it is connected to end nodes whose valence is less than MINIMUM_VALENCE. See OneWayTag.isTwoWay(org.openstreetmap.atlas.tags.OneWayTag) for more details on how one-way checks.
        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.