private ShapePoint doMap(org.onebusaway.gtfs.model.ShapePoint rhs) { ShapePoint lhs = new ShapePoint(); lhs.setShapeId(AgencyAndIdMapper.mapAgencyAndId(rhs.getShapeId())); lhs.setSequence(rhs.getSequence()); lhs.setLat(rhs.getLat()); lhs.setLon(rhs.getLon()); lhs.setDistTraveled(rhs.getDistTraveled()); // Skip mapping of proxy // private transient StopTimeProxy proxy; if (rhs.getProxy() != null) { throw new IllegalStateException("Did not expect proxy to be set! Data: " + rhs); } return lhs; } }
shapePoint.getShapeId().setAgencyId(reader.getDefaultAgencyId());
@Override public int compare(ShapePoint o1, ShapePoint o2) { int c = o1.getShapeId().compareTo(o2.getShapeId()); if (c == 0) c = o1.getSequence() - o2.getSequence(); return c; }
@Override public int compare(ShapePoint o1, ShapePoint o2) { int c = o1.getShapeId().compareTo(o2.getShapeId()); if (c == 0) c = o1.getSequence() - o2.getSequence(); return c; }
@Override public String toString() { return "<ShapePoint " + getShapeId() + " #" + getSequence() + " (" + getLat() + "," + getLon() + ")>"; }
@Override public String toString() { return "<ShapePoint " + getShapeId() + " #" + getSequence() + " (" + getLat() + "," + getLon() + ")>"; }
/**** * {@link List} Interface ****/ @Override public boolean add(ShapePoint shapePoint) { int index = size; size++; ensureCapacity(size); shapeIds[index] = shapePoint.getShapeId(); sequences[index] = shapePoint.getSequence(); lats[index] = shapePoint.getLat(); lons[index] = shapePoint.getLon(); distTraveled[index] = shapePoint.getDistTraveled(); return true; }
/**** * {@link List} Interface ****/ @Override public boolean add(ShapePoint shapePoint) { int index = size; size++; ensureCapacity(size); shapeIds[index] = shapePoint.getShapeId(); sequences[index] = shapePoint.getSequence(); lats[index] = shapePoint.getLat(); lons[index] = shapePoint.getLon(); distTraveled[index] = shapePoint.getDistTraveled(); return true; }
if (shapePoints != null && !ignoreShapes && shapePoints.size() > 3) { for (ShapePoint p : shapePoints) { String shapeId = p.getShapeId().getId();