for (ShapePoint point : shapePoints) { point.setDistTraveled(ShapePoint.MISSING_VALUE); point.setSequence(index++); point.setShapeId(ashapeId);
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; }
@Override protected void saveElementsForKey(GtfsMergeContext context, AgencyAndId shapeId) { GtfsRelationalDao source = context.getSource(); GtfsMutableRelationalDao target = context.getTarget(); for (ShapePoint shapePoint : source.getShapePointsForShapeId(shapeId)) { shapePoint.setId(0); shapePoint.setSequence(context.getNextSequenceCounter()); target.saveEntity(shapePoint); } }
@Override protected void saveElementsForKey(GtfsMergeContext context, AgencyAndId shapeId) { GtfsRelationalDao source = context.getSource(); GtfsMutableRelationalDao target = context.getTarget(); for (ShapePoint shapePoint : source.getShapePointsForShapeId(shapeId)) { shapePoint.setId(0); shapePoint.setSequence(context.getNextSequenceCounter()); target.saveEntity(shapePoint); } }
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++); nsp.setLat(sp.getLat()); nsp.setLon(sp.getLon());