GridCoverage2D gridCoverage = (GridCoverage2D) factory.create(name,image,envelope);
CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:24882");
RenderingHints hints = new RenderingHints(Hints.LENIENT_DATUM_SHIFT, Boolean.TRUE);
CoverageProcessor processor = new CoverageProcessor(hints);
GridCoverage2D reprojected = gridCoverage.view(ViewType.GEOPHYSICS);
ParameterValueGroup param = processor.getOperation("Resample").getParameters();
param.parameter("Source").setValue( reprojected );
param.parameter("CoordinateReferenceSystem").setValue(targetCRS);
param.parameter("InterpolationType").setValue("NearestNeighbor");
reprojected = (GridCoverage2D) processor.doOperation(param);
reprojected = reprojected.view(ViewType.RENDERED);
ImageViewer.show(gridCoverage, "Normal Grid Coverage");
ImageViewer.show(reprojected, "Reprojected Grid Coverage");