Package dev.avelar.mapnik
Enum Class SimplifyAlgorithm
- All Implemented Interfaces:
Serializable,Comparable<SimplifyAlgorithm>,Constable
How
Geometry.simplify(dev.avelar.mapnik.SimplifyAlgorithm, double) decides which points to drop. The tolerance means something different
for each, so try a value and look at the result.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionKeeps points that deviate from a straight run by more than the tolerance.Drops points closer than the tolerance to the previous kept point.Drops the points that change the shape least, by triangle area.A variant of Visvalingam-Whyatt that keeps the line's overall direction. -
Method Summary
Modifier and TypeMethodDescriptionstatic SimplifyAlgorithmReturns the enum constant of this class with the specified name.static SimplifyAlgorithm[]values()Returns an array containing the constants of this enum class, in the order they are declared.xmlName()The name as written in style files, for exampledouglas-peucker.
-
Enum Constant Details
-
RADIAL_DISTANCE
Drops points closer than the tolerance to the previous kept point. Fast and crude. -
DOUGLAS_PEUCKER
Keeps points that deviate from a straight run by more than the tolerance. The usual choice. -
VISVALINGAM_WHYATT
Drops the points that change the shape least, by triangle area. Smooth results. -
ZHAO_SALFELD
A variant of Visvalingam-Whyatt that keeps the line's overall direction.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
xmlName
The name as written in style files, for exampledouglas-peucker.
-