Class ApproximateWayCheck
- java.lang.Object
-
- org.openstreetmap.atlas.checks.base.BaseCheck<java.lang.Long>
-
- org.openstreetmap.atlas.checks.validation.linear.edges.ApproximateWayCheck
-
- All Implemented Interfaces:
java.io.Serializable,Check
public class ApproximateWayCheck extends BaseCheck<java.lang.Long>
This check flags edges that deviate from the assumed curve of a road by at least 10.0 meters.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static doubleBEZIER_STEP_DEFAULTstatic doubleDEVIATION_MAXIMUM_RATIO_DEFAULTstatic doubleDEVIATION_MINIMUM_LENGTH_DEFAULTstatic doubleMAX_ANGLE_DEFAULTstatic doubleMIN_ANGLE_DEFAULT-
Fields inherited from class org.openstreetmap.atlas.checks.base.BaseCheck
PARAMETER_ACCEPT_PIERS, PARAMETER_CHALLENGE, PARAMETER_DENYLIST_COUNTRIES, PARAMETER_FLAG, PARAMETER_PERMITLIST_COUNTRIES, PARAMETER_PERMITLIST_TAGS, PARAMETER_USE_EXTERNAL_DATA
-
-
Constructor Summary
Constructors Constructor Description ApproximateWayCheck(org.openstreetmap.atlas.utilities.configuration.Configuration configuration)The default constructor that must be supplied.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Optional<CheckFlag>flag(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object)This is the actual function that will check to see whether the object needs to be flagged.protected java.util.List<java.lang.String>getFallbackInstructions()Method to implement for inheriting checks to return the default set of instruction formats that will be the last resort inBaseCheck.getLocalizedInstruction(int, Object[])booleanvalidCheckForObject(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object)This function will validate if the supplied atlas object is valid for the check.-
Methods inherited from class org.openstreetmap.atlas.checks.base.BaseCheck
acceptPier, check, checkObjectFilter, clear, clearFlaggedIdentifiers, configurationKey, configurationKey, configurationValue, configurationValue, createFlag, createFlag, createFlag, createFlag, createFlag, createFlag, createFlag, createFlag, flags, getChallenge, getCheckName, getCheckPolygonFilter, getCountries, getDenylistCountries, getFlaggedIdentifiers, getGlobalPolygonFilter, getLocale, getLocalizedInstruction, getTaskIdentifier, getTaskIdentifier, getUniqueObjectIdentifier, getUniqueOSMIdentifier, isFlagged, logStatus, markAsFlagged, useExternalData, validCheckForCountry
-
-
-
-
Field Detail
-
DEVIATION_MAXIMUM_RATIO_DEFAULT
public static final double DEVIATION_MAXIMUM_RATIO_DEFAULT
- See Also:
- Constant Field Values
-
DEVIATION_MINIMUM_LENGTH_DEFAULT
public static final double DEVIATION_MINIMUM_LENGTH_DEFAULT
- See Also:
- Constant Field Values
-
MIN_ANGLE_DEFAULT
public static final double MIN_ANGLE_DEFAULT
- See Also:
- Constant Field Values
-
MAX_ANGLE_DEFAULT
public static final double MAX_ANGLE_DEFAULT
- See Also:
- Constant Field Values
-
BEZIER_STEP_DEFAULT
public static final double BEZIER_STEP_DEFAULT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ApproximateWayCheck
public ApproximateWayCheck(org.openstreetmap.atlas.utilities.configuration.Configuration configuration)
The default constructor that must be supplied. The Atlas Checks framework will generate the checks with this constructor, supplying a configuration that can be used to adjust any parameters that the check uses during operation.- Parameters:
configuration- the JSON configuration for this check
-
-
Method Detail
-
validCheckForObject
public boolean validCheckForObject(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object)
This function will validate if the supplied atlas object is valid for the check.- Parameters:
object- the atlas object supplied by the Atlas-Checks framework for evaluation- Returns:
trueif this object should be checked
-
flag
protected java.util.Optional<CheckFlag> flag(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object)
This is the actual function that will check to see whether the object needs to be flagged. A majority of flagged edges were those that contained correctly mapped ~90 degree angles, we also don't want to worry about sharp angles as those are flagged inSharpAngleCheck
-
getFallbackInstructions
protected java.util.List<java.lang.String> getFallbackInstructions()
Description copied from class:BaseCheckMethod to implement for inheriting checks to return the default set of instruction formats that will be the last resort inBaseCheck.getLocalizedInstruction(int, Object[])- Overrides:
getFallbackInstructionsin classBaseCheck<java.lang.Long>- Returns:
- The set of instructions to fall back to if configuration results in none.
-
-