/** * @see com.vividsolutions.jts.geom.CoordinateSequence#getCoordinate(int) */ public Coordinate getCoordinateCopy(int i) { return getCoordinateInternal(i); }
/** * @see com.vividsolutions.jts.geom.CoordinateSequence#getCoordinate(int) */ public Coordinate getCoordinate(int i) { Coordinate[] coords = getCachedCoords(); if(coords != null) return coords[i]; else return getCoordinateInternal(i); } /**
/** * @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#getCoordinate(int) */ public Coordinate getCoordinateCopy(int i) { return getCoordinateInternal(i); }
/** * @see com.vividsolutions.jts.geom.CoordinateSequence#getCoordinate(int) */ public Coordinate getCoordinate(int i) { Coordinate[] coords = getCachedCoords(); if(coords != null) return coords[i]; else return getCoordinateInternal(i); } /**
/** * @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; }