PositionImpl p2 = new PositionImpl(tCoordFactory.createDirectPosition(new double[]{-30, 30, 10}));
PositionImpl p3 = new PositionImpl(tCoordFactory.createDirectPosition(new double[]{0, 50, 20}));
PositionImpl p4 = new PositionImpl(tCoordFactory.createDirectPosition(new double[]{30, 30, 10}));
PositionImpl p5 = new PositionImpl(tCoordFactory.createDirectPosition(new double[]{50, 0, 0}));
LineStringImpl line1 = null;
ArrayList<Position> positionList = new ArrayList<Position>();
positionList.add(p1);
positionList.add(p2);
positionList.add(p3);
positionList.add(p4);
positionList.add(p5);
try {
line1 = tCoordFactory.createLineString(positionList);
} catch (IllegalArgumentException e) {
//System.out.println(e);
}
/* Set parent curve for LineString */
ArrayList<CurveSegment> tLineList = new ArrayList<CurveSegment>();
tLineList.add(line1);
// PrimitiveFactory.createCurve(List<CurveSegment>)
CurveImpl curve1 = tPrimFactory.createCurve(tLineList);
// Set curve for further LineString tests
line1.setCurve(curve1);
return curve1;
}