for (int i = 0; i < this.elements.size(); i++) {
CurveImpl tCurve = (CurveImpl) this.elements.get(i);
Iterator<CurveSegment> tCurveSegmentIter = tCurve.getSegments()
.iterator();
CurveSegment tSegment = null;
// Iterate all CurveSegments (= LineStrings)
while (tCurveSegmentIter.hasNext()) {
tSegment = tCurveSegmentIter.next();
// TODO: This version only handles the CurveSegment type
// LineString
LineStringImpl tLineString = (LineStringImpl) tSegment;
Iterator<LineSegment> tLineSegmentIter = tLineString
.asLineSegments().iterator();
while (tLineSegmentIter.hasNext()) {
LineSegment tLineSegment = tLineSegmentIter.next();
// Add new Coordinate, which is the start point of the
// actual LineSegment
rList.add( tLineSegment.getStartPoint());
}
}
// Add new Coordinate, which is the end point of the last
// curveSegment
rList.add( tSegment.getEndPoint());
}
return rList;
}