public class PolylineEncoder extends Object
Constructor and Description |
---|
PolylineEncoder() |
Modifier and Type | Method and Description |
---|---|
static EncodedPolylineBean |
createEncodings(double[] lat,
double[] lon) |
static EncodedPolylineBean |
createEncodings(double[] lat,
double[] lon,
int level) |
static EncodedPolylineBean |
createEncodings(double[] lat,
double[] lon,
int offset,
int length,
int level) |
static EncodedPolylineBean |
createEncodings(com.vividsolutions.jts.geom.Geometry geometry) |
static EncodedPolylineBean |
createEncodings(Iterable<com.vividsolutions.jts.geom.Coordinate> points) |
static EncodedPolylineBean |
createEncodings(Iterable<com.vividsolutions.jts.geom.Coordinate> points,
int level)
If level < 0, then
EncodedPolylineBean.getLevels() will be null. |
static List<com.vividsolutions.jts.geom.Coordinate> |
decode(EncodedPolylineBean polyline) |
static int |
decodeNumber(String value) |
static int[] |
decodeNumberWithIndex(String value,
int index) |
static int |
decodeSignedNumber(String value) |
static int[] |
decodeSignedNumberWithIndex(String value,
int index) |
static String |
encodeNumber(int num) |
static String |
encodeSignedNumber(int num) |
public static EncodedPolylineBean createEncodings(double[] lat, double[] lon)
public static EncodedPolylineBean createEncodings(double[] lat, double[] lon, int level)
public static EncodedPolylineBean createEncodings(double[] lat, double[] lon, int offset, int length, int level)
public static EncodedPolylineBean createEncodings(Iterable<com.vividsolutions.jts.geom.Coordinate> points)
public static EncodedPolylineBean createEncodings(com.vividsolutions.jts.geom.Geometry geometry)
public static EncodedPolylineBean createEncodings(Iterable<com.vividsolutions.jts.geom.Coordinate> points, int level)
EncodedPolylineBean.getLevels()
will be null.points
- level
- public static List<com.vividsolutions.jts.geom.Coordinate> decode(EncodedPolylineBean polyline)
public static String encodeSignedNumber(int num)
public static int decodeSignedNumber(String value)
public static int[] decodeSignedNumberWithIndex(String value, int index)
public static String encodeNumber(int num)
public static int decodeNumber(String value)
public static int[] decodeNumberWithIndex(String value, int index)
Copyright © 2018. All rights reserved.