public PointArray createPointArray() { return getPositionFactory().createPointArray(); }
public PointArray createPositionList(float[] array, int start, int end) { return getPositionFactory().createPointArray(array, start, end); }
public PointArray createPointArray(double[] array, int start, int end) { return getPositionFactory().createPointArray(array, start, end); }
public PointArray createPointArray(double[] array) { return getPositionFactory() .createPointArray( array, 0, array.length / crs.getCoordinateSystem().getDimension()); }
/** * @param coordLists * @param lineStrings * @return Collection<LineStringImpl> */ public Collection<LineStringImpl> createLineStrings( Collection<List<double[]>> coordLists, List<LineStringImpl> lineStrings) { if (lineStrings == null) lineStrings = new ArrayList<LineStringImpl>(coordLists.size()); //GeometryFactoryImpl cf = this.geometryFactory.getGeometryFactoryImpl(); double startPar = 0.0; for (List<double[]> coordList : coordLists) { //List<Position> positions = cf.createPositions(coordList, null); PointArray positions = positionFactory.createPointArray(); for (double[] coords : coordList) { positions.add(createPosition(coords)); } PointArrayImpl pai = createPointArray(positions); lineStrings.add(createLineString(pai, startPar)); startPar += pai.getDistanceSum(); } return lineStrings; }