/** * Creates a deep copy of this sequence. * * @return a new sequence with values */ @Override public Object clone() { CoordinateSequence2D copy = new CoordinateSequence2D(x.length); for (int i = 0; i < x.length; i++) { copy.x[i] = x[i]; copy.y[i] = y[i]; } return copy; }
testPointCS = new CoordinateSequence2D(1); testPoint = geomFactory.createPoint(testPointCS); testRectCS = new CoordinateSequence2D(5); testRect = geomFactory.createPolygon(geomFactory.createLinearRing(testRectCS), null);
/** * Builds the bounds of the rectangle used to test inclusion in the * reference {@code PreparedGeometry}. * * @param x origin X ordinate * @param y origin Y ordinate */ private Polygon getTestRect(int x, int y) { CoordinateSequence2D testRectCS = new CoordinateSequence2D(5); testRectCS.setXY(0, x , y ); testRectCS.setXY(1, x , y + tileHeight ); testRectCS.setXY(2, x + tileWidth , y + tileHeight ); testRectCS.setXY(3, x + tileWidth , y ); testRectCS.setXY(4, x , y ); return gf.createPolygon(gf.createLinearRing(testRectCS), null); } }
if ((firstEvent != null) && (lastEvent != null) && (xy.length >= 4)) { final CoordinateSequence2D coordinateSequence = new CoordinateSequence2D(ArrayUtils.toPrimitive(xy)); final LineString lineString = GeometryUtils.GEOMETRY_FACTORY.createLineString(coordinateSequence); new CoordinateSequence2D(ArrayUtils.toPrimitive(dxy)); LineString detailLineString = null; if (detailCoordinateSequence.size() > 0) {