* @param pts
* an array of {@link Coordinate}s
*/
public void addPointSequence(List<DirectPosition> pts) {
DirectPositionImpl dpAct = new DirectPositionImpl( pts.get(0) );
DirectPositionImpl directPositionNext;
for (int i = 0; i < pts.size()-1; i++) {
directPositionNext = new DirectPositionImpl( pts.get(i+1) );
double segmentLen = dpAct.distance(directPositionNext);
this.totalLength += segmentLen;
DirectPositionImpl tempMid = dpAct.clone();
tempMid.add( directPositionNext);
tempMid.divideBy(2);
tempMid.scale(segmentLen);
this.centSum.add(tempMid);
dpAct = directPositionNext;
}
}