// create a DefaultDerivedCRS for the CRS of the image
DefaultDerivedCRS derivedCRS = new DefaultDerivedCRS("imageCRS", this.crsTarget, warpTransform, //$NON-NLS-1$
DefaultCartesianCS.GENERIC_2D);
// now create a gridcoverage for the new warped image
GridCoverageFactory factory = new GridCoverageFactory();
ReferencedEnvelope ref = new ReferencedEnvelope(0, image.getWidth(null), 0, image.getHeight(null), derivedCRS);
GridCoverage2D coverage = (GridCoverage2D) factory.create("GridCoverage", image, ref); //$NON-NLS-1$
// resample the new image with the world CRS
GridCoverage2D warpedCoverage = null;
try {
Operations ops = new Operations(null);