Class LevelCrossingOnRailwayCheck

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

    public class LevelCrossingOnRailwayCheck
    extends BaseCheck<java.lang.Long>
    This check is to detect and flag nodes under the three scenarios below: 1) When a railway crosses a highway, but intersection node is missing. 2) When railway/highway intersection node exists, but railway=level_crossing tag is missing. 3) When tag railway=level_crossing exists, on a node, but is lacking of either highway or railway going through the node (osmose 7090), or not on a node, instead, on the related way features (osmose 9015)
    See Also:
    Serialized Form
    • Constructor Detail

      • LevelCrossingOnRailwayCheck

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

      • validCheckForObject

        public boolean validCheckForObject​(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object)
        Object check looks for the vaild objects to check for level_crossing tag.
        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)
        Create a Return Flags for level_crossing objects.
        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 that contains flagged issue details
      • 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.