Class PolylineSimplifier.Options
Class PolylineSimplifier.Options
- java.lang.Object
-
- com.here.sdk.core.PolylineSimplifier.Options
-
- Enclosing class:
- PolylineSimplifier
public static final class PolylineSimplifier.Options extends java.lang.ObjectControls the strategy of
PolylineSimplifier.simplify(java.util.List<com.here.sdk.core.GeoCoordinates>, com.here.sdk.core.PolylineSimplifier.Options, com.here.sdk.core.PolylineSimplificationCallback)when reducing a size of polyline.
-
-
Field Summary
Fields Modifier and Type Field Description longmaxPointsSets the upper limit on the resulting collection for thePolylineSimplifier.simplify(java.util.List<com.here.sdk.core.GeoCoordinates>, com.here.sdk.core.PolylineSimplifier.Options, com.here.sdk.core.PolylineSimplificationCallback).static longSIMPLIFICATION_IN_METERS_14_ZOOM_LEVELValue for simplification tolerance for 14 zoom level without significant artifacts.longsimplificationToleranceInMetersSets the accuracy limit for thePolylineSimplifier.simplify(java.util.List<com.here.sdk.core.GeoCoordinates>, com.here.sdk.core.PolylineSimplifier.Options, com.here.sdk.core.PolylineSimplificationCallback): higher tolerance results in more simplification (fewer points); lower tolerance keeps the line closer to its original shape.
-
Constructor Summary
Constructors Constructor Description Options()Creates default options withmaxPointsequal to 0 andsimplificationToleranceInMetersequal toSIMPLIFICATION_IN_METERS_14_ZOOM_LEVEL.Options(long maxPoints, long simplificationToleranceInMeters)Creates options with explicitly specifiedmaxPointsandsimplificationToleranceInMeters.
-
-
-
Field Detail
-
SIMPLIFICATION_IN_METERS_14_ZOOM_LEVEL
public static final long SIMPLIFICATION_IN_METERS_14_ZOOM_LEVEL
Value for simplification tolerance for 14 zoom level without significant artifacts.
- See Also:
- Constant Field Values
-
maxPoints
public long maxPoints
Sets the upper limit on the resulting collection for the
PolylineSimplifier.simplify(java.util.List<com.here.sdk.core.GeoCoordinates>, com.here.sdk.core.PolylineSimplifier.Options, com.here.sdk.core.PolylineSimplificationCallback). Lower value results in the lower accuracy of the resulting polyline. IfmaxPointsis less than2then resulting polyline will not have an upper limit on the size and onlysimplificationToleranceInMeterswill be considered. WhenmaxPointsis greater than size of the passed polyline then simplification algorithm will take into account onlysimplificationToleranceInMeters.
-
simplificationToleranceInMeters
public long simplificationToleranceInMeters
Sets the accuracy limit for the
PolylineSimplifier.simplify(java.util.List<com.here.sdk.core.GeoCoordinates>, com.here.sdk.core.PolylineSimplifier.Options, com.here.sdk.core.PolylineSimplificationCallback):- higher tolerance results in more simplification (fewer points);
- lower tolerance keeps the line closer to its original shape.
If removing a point produces polyline, which deviates from the original one more than
simplificationToleranceInMeters, then this point is left in the collection.If specified tolerance will not allow to create a polyline conforming to
maxPoints, thensimplificationToleranceInMetersis ignored.Default value is equal to
SIMPLIFICATION_IN_METERS_14_ZOOM_LEVEL.
-
-
Constructor Detail
-
Options
public Options()
Creates default options with
maxPointsequal to 0 andsimplificationToleranceInMetersequal toSIMPLIFICATION_IN_METERS_14_ZOOM_LEVEL.
-
Options
public Options(long maxPoints, long simplificationToleranceInMeters)Creates options with explicitly specified
maxPointsandsimplificationToleranceInMeters.- Parameters:
maxPoints-Sets the upper limit on the resulting collection for the
PolylineSimplifier.simplify(java.util.List<com.here.sdk.core.GeoCoordinates>, com.here.sdk.core.PolylineSimplifier.Options, com.here.sdk.core.PolylineSimplificationCallback). Lower value results in the lower accuracy of the resulting polyline. IfmaxPointsis less than2then resulting polyline will not have an upper limit on the size and onlysimplificationToleranceInMeterswill be considered. WhenmaxPointsis greater than size of the passed polyline then simplification algorithm will take into account onlysimplificationToleranceInMeters.simplificationToleranceInMeters-Sets the accuracy limit for the
PolylineSimplifier.simplify(java.util.List<com.here.sdk.core.GeoCoordinates>, com.here.sdk.core.PolylineSimplifier.Options, com.here.sdk.core.PolylineSimplificationCallback):- higher tolerance results in more simplification (fewer points);
- lower tolerance keeps the line closer to its original shape.
If removing a point produces polyline, which deviates from the original one more than
simplificationToleranceInMeters, then this point is left in the collection.If specified tolerance will not allow to create a polyline conforming to
maxPoints, thensimplificationToleranceInMetersis ignored.Default value is equal to
SIMPLIFICATION_IN_METERS_14_ZOOM_LEVEL.
-
-