public final class PolylineUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.List<Point> |
decode(java.lang.String encodedPath,
int precision)
Decodes an encoded path string into a sequence of
Point . |
static java.lang.String |
encode(java.util.List<Point> path,
int precision)
Encodes a sequence of Points into an encoded path string.
|
static java.util.List<Point> |
simplify(java.util.List<Point> points)
Deprecated.
Use TurfTransformation#simplify.
|
static java.util.List<Point> |
simplify(java.util.List<Point> points,
boolean highestQuality)
Deprecated.
Use TurfTransformation#simplify.
|
static java.util.List<Point> |
simplify(java.util.List<Point> points,
double tolerance)
Deprecated.
Use TurfTransformation#simplify.
|
static java.util.List<Point> |
simplify(java.util.List<Point> points,
double tolerance,
boolean highestQuality)
Deprecated.
Use TurfTransformation#simplify.
|
@NonNull public static java.util.List<Point> decode(@NonNull java.lang.String encodedPath, int precision)
Point
.encodedPath
- a String representing an encoded path stringprecision
- OSRMv4 uses 6, OSRMv5 and Google uses 5Point
making up the line@NonNull public static java.lang.String encode(@NonNull java.util.List<Point> path, int precision)
path
- list of Point
s making up the lineprecision
- OSRMv4 uses 6, OSRMv5 and Google uses 5@Deprecated @NonNull public static java.util.List<Point> simplify(@NonNull java.util.List<Point> points)
points
- an array of points@Deprecated @NonNull public static java.util.List<Point> simplify(@NonNull java.util.List<Point> points, double tolerance)
points
- an array of pointstolerance
- affects the amount of simplification (in the same metric as the point
coordinates)@Deprecated @NonNull public static java.util.List<Point> simplify(@NonNull java.util.List<Point> points, boolean highestQuality)
points
- an array of pointshighestQuality
- excludes distance-based preprocessing step which leads to highest quality
simplification@Deprecated @NonNull public static java.util.List<Point> simplify(@NonNull java.util.List<Point> points, double tolerance, boolean highestQuality)
points
- an array of pointstolerance
- affects the amount of simplification (in the same metric as the point
coordinates)highestQuality
- excludes distance-based preprocessing step which leads to highest quality
simplification