org.onebusaway.geospatial.services
Class PolylineEncoder

java.lang.Object
  extended by org.onebusaway.geospatial.services.PolylineEncoder

public class PolylineEncoder
extends Object


Constructor Summary
PolylineEncoder()
           
 
Method Summary
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(Iterable<CoordinatePoint> points)
           
static EncodedPolylineBean createEncodings(Iterable<CoordinatePoint> points, int level)
          If level < 0, then EncodedPolylineBean.getLevels() will be null.
static List<CoordinatePoint> decode(EncodedPolylineBean polyline)
           
static List<CoordinatePoint> decode(String pointString)
           
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolylineEncoder

public PolylineEncoder()
Method Detail

createEncodings

public static EncodedPolylineBean createEncodings(double[] lat,
                                                  double[] lon)

createEncodings

public static EncodedPolylineBean createEncodings(double[] lat,
                                                  double[] lon,
                                                  int level)

createEncodings

public static EncodedPolylineBean createEncodings(double[] lat,
                                                  double[] lon,
                                                  int offset,
                                                  int length,
                                                  int level)

createEncodings

public static EncodedPolylineBean createEncodings(Iterable<CoordinatePoint> points)

createEncodings

public static EncodedPolylineBean createEncodings(Iterable<CoordinatePoint> points,
                                                  int level)
If level < 0, then EncodedPolylineBean.getLevels() will be null.

Parameters:
points -
level -
Returns:

decode

public static List<CoordinatePoint> decode(EncodedPolylineBean polyline)

decode

public static List<CoordinatePoint> decode(String pointString)

encodeSignedNumber

public static String encodeSignedNumber(int num)

decodeSignedNumber

public static int decodeSignedNumber(String value)

decodeSignedNumberWithIndex

public static int[] decodeSignedNumberWithIndex(String value,
                                                int index)

encodeNumber

public static String encodeNumber(int num)

decodeNumber

public static int decodeNumber(String value)

decodeNumberWithIndex

public static int[] decodeNumberWithIndex(String value,
                                          int index)


Copyright © 2011 OneBusAway. All Rights Reserved.