/** * @see com.vividsolutions.jts.geom.CoordinateSequence#toCoordinateArray() */ public Coordinate[] toCoordinateArray() { Coordinate[] coords = getCachedCoords(); // testing - never cache if (coords != null) return coords; coords = new Coordinate[size()]; for (int i = 0; i < coords.length; i++) { coords[i] = getCoordinateInternal(i); } coordRef = new SoftReference(coords); return coords; }
/** * @see com.vividsolutions.jts.geom.CoordinateSequence#toCoordinateArray() */ public Coordinate[] toCoordinateArray() { Coordinate[] coords = getCachedCoords(); // testing - never cache if (coords != null) return coords; coords = new Coordinate[size()]; for (int i = 0; i < coords.length; i++) { coords[i] = getCoordinateInternal(i); } coordRef = new SoftReference(coords); return coords; }
private CoordinateSequence transformInternal( PackedCoordinateSequence sequence, MathTransform transform ) throws TransformException{ start.setSequence(sequence); for(int i=0; i<sequence.size();i++ ){ start.setOffset(i); try { transform.transform(start, start); } catch (MismatchedDimensionException e) { throw new TransformException( "", e); } } return sequence; }
private CoordinateSequence transformInternal( PackedCoordinateSequence sequence, MathTransform transform ) throws TransformException{ start.setSequence(sequence); for(int i=0; i<sequence.size();i++ ){ start.setOffset(i); try { transform.transform(start, start); } catch (MismatchedDimensionException e) { throw new TransformException( "", e); } } return sequence; }