@Override public ShapePoint get(int index) { if (index < 0 || index >= size) { throw new NoSuchElementException(); } ShapePoint shapePoint = new ShapePoint(); shapePoint.setProxy(new ShapePointProxyImpl(index)); return shapePoint; }
@Override public ShapePoint get(int index) { if (index < 0 || index >= size) { throw new NoSuchElementException(); } ShapePoint shapePoint = new ShapePoint(); shapePoint.setProxy(new ShapePointProxyImpl(index)); return shapePoint; }
@Override public ShapePoint next() { if (!hasNext()) { throw new NoSuchElementException(); } ShapePoint shapePoint = new ShapePoint(); shapePoint.setProxy(new ShapePointProxyImpl(index)); index++; return shapePoint; }
@Override public ShapePoint next() { if (!hasNext()) { throw new NoSuchElementException(); } ShapePoint shapePoint = new ShapePoint(); shapePoint.setProxy(new ShapePointProxyImpl(index)); index++; return shapePoint; }
private List<ShapePoint> decode(String pointString) { double lat = 0; double lon = 0; int strIndex = 0; List<ShapePoint> points = new ArrayList<ShapePoint>(); while (strIndex < pointString.length()) { int[] rLat = decodeSignedNumberWithIndex(pointString, strIndex); lat = lat + rLat[0] * 1e-5; strIndex = rLat[1]; int[] rLon = decodeSignedNumberWithIndex(pointString, strIndex); lon = lon + rLon[0] * 1e-5; strIndex = rLon[1]; ShapePoint point = new ShapePoint(); point.setLat(lat); point.setLon(lon); points.add(point); } return points; }
public static ShapePoint shapePoint(String id, int sequence, double lat, double lon) { ShapePoint point = new ShapePoint(); point.setId(sequence); point.setSequence(sequence); point.setLat(lat); point.setLon(lon); point.setShapeId(aid(id)); return point; }
public static ShapePoint shapePoint(String id, int sequence, double lat, double lon) { ShapePoint point = new ShapePoint(); point.setId(sequence); point.setSequence(sequence); point.setLat(lat); point.setLon(lon); point.setShapeId(aid(id)); return point; }
ShapePoint nsp = new ShapePoint(); nsp.setShapeId(newShapeId); nsp.setSequence(newIndex++);
int shapePointTo = getClosestShapePointToStop(points, lastStop); for (int index = shapePointFrom; index <= shapePointTo; ++index) { ShapePoint point = new ShapePoint(points.get(index)); point.setId(0); point.setShapeId(newShapeId);
int shapePointTo = getClosestShapePointToStop(points, lastStop); for (int index = shapePointFrom; index <= shapePointTo; ++index) { ShapePoint point = new ShapePoint(points.get(index)); point.setId(0); point.setShapeId(newShapeId);