Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/backend/gtfs/PolylineParser.java
package it.reyboz.bustorino.backend.gtfs; | package it.reyboz.bustorino.backend.gtfs; | ||||
import org.osmdroid.util.GeoPoint; | import org.osmdroid.util.GeoPoint; | ||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
public final class PolylineParser { | public abstract class PolylineParser { | ||||
/** | /** | ||||
* Decode a Google polyline | * Decode a Google polyline | ||||
* Thanks to https://stackoverflow.com/questions/9341020/how-to-decode-googles-polyline-algorithm | * Thanks to https://stackoverflow.com/questions/9341020/how-to-decode-googles-polyline-algorithm | ||||
* @param encodedPolyline the encoded polyline in a string | * @param encodedPolyline the encoded polyline in a string | ||||
* @param initial_capacity for the list | * @param initial_capacity for the list | ||||
* @return the list of points correspoding to the polyline | * @return the list of points correspoding to the polyline | ||||
*/ | */ | ||||
public static ArrayList<GeoPoint> decodePolyline(String encodedPolyline, int initial_capacity) { | public static ArrayList<GeoPoint> decodePolyline(String encodedPolyline, int initial_capacity) { | ||||
Show All 33 Lines |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register