Class FloatingEdgeCheck

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

    public class FloatingEdgeCheck
    extends BaseCheck<java.lang.Long>
    This check will look for any edges that do not contain any incoming or outgoing edges. The appearance on the map would be that of a road simply floating in the middle of nowhere. No way for any navigation, no ability to enter the Edge (road) from any point and no way to exit it. To resolve the issue a mapper would either remove the edge as invalid or connect it to a connected set of edges.
    See Also:
    Serialized Form
    • Field Detail

      • DISTANCE_MAXIMUM_KILOMETERS_DEFAULT

        public static final double DISTANCE_MAXIMUM_KILOMETERS_DEFAULT
        See Also:
        Constant Field Values
      • DISTANCE_MINIMUM_METERS_DEFAULT

        public static final double DISTANCE_MINIMUM_METERS_DEFAULT
        See Also:
        Constant Field Values
    • Constructor Detail

      • FloatingEdgeCheck

        public FloatingEdgeCheck​(org.openstreetmap.atlas.utilities.configuration.Configuration configuration)
        Default constructor defined by the BaseCheck required to instantiate the Check within the Atlas Checks framework
        Parameters:
        configuration - the configuration supplied by the framework containing custom properties for the floating edge check
    • Method Detail

      • validCheckForObject

        public boolean validCheckForObject​(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object)
        Checks if the supplied object is of ItemType Edge and that it is the MasterEdge and whether a car can navigate on the edge. So we would ignore any pedestrian paths in this particular check. An Edge contains a master edge and a reserve edge, unless it is a oneway edge in which case it will only contain the master edge. Either way we want to ignore the reverse edge so that we don't produce duplicate flags for what is essentially the same feature.
        Parameters:
        object - the AtlasObject you are checking
        Returns:
        true if matches the restrictions described above
      • flag

        protected java.util.Optional<CheckFlag> flag​(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object)
        The primary function that will check to see if the current edge is a floating edge
        Specified by:
        flag in class BaseCheck<java.lang.Long>
        Parameters:
        object - the AtlasObject you are checking
        Returns:
        an Optional CheckFlag that contains the problem object and instructions on how to fix it, or the reason the object was flagged
      • 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.