Class GeneralizedCoastlineCheck

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

    public class GeneralizedCoastlineCheck
    extends BaseCheck<java.lang.Long>
    Flags generalized coastlines-- that is, OSM ways with the tag natural=coastline where x% or more node pairs are y or more meters apart. X and y can be specified in a Configuration. Additionally flags sharp angle locations according to the angle.minimum.threshold Configuration value if it's greater than -1. Coastlines can be represented in Atlas by LineItems and may be members of Relations.
    See Also:
    Serialized Form
    • Constructor Detail

      • GeneralizedCoastlineCheck

        public GeneralizedCoastlineCheck​(org.openstreetmap.atlas.utilities.configuration.Configuration configuration)
    • Method Detail

      • validCheckForObject

        public boolean validCheckForObject​(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object)
        This method validates or invalidates the supplied atlas object for the check
        Parameters:
        object - The AtlasObject being checked
        Returns:
        True if the AtlasObject is a LineItem with the tag natural=coastline, or has a parent relation with that tag; false otherwise
      • flag

        protected java.util.Optional<CheckFlag> flag​(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object)
        This method flags appropriate atlas objects
        Specified by:
        flag in class BaseCheck<java.lang.Long>
        Parameters:
        object - The AtlasObject being analyzed for potential flagging
        Returns:
        A flag on the parameter AtlasObject if it's a generalized coastline; an empty Optional otherwise
      • 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.