I have a GridCoverage2D in EPSG:4054. I want to transform it to EPSG:4326.
I have tried to do it this way:
/** gc2d is an GridCoverage2D in EPSG:4054 */
CoordinateReferenceSystem targetCRS = crsAuthorityFactory.createCoordinateReferenceSystem("EPSG:4326");
GridCoverage2D gc2d_projected_2 = Resample(gc2d, targetCRS);
where Resample function is:
public static GridCoverage2D Resample(GridCoverage2D input, CoordinateReferenceSystem targetCRS) throws FactoryException {
final CoverageProcessor processor = CoverageProcessor.getInstance(null);
final ParameterValueGroup param=processor.getOperation("Resample").getParameters();
param.parameter("Source").setValue(input);
param.parameter("CoordinateReferenceSystem").setValue(targetCRS);
param.parameter("InterpolationType").setValue("bilinear");
return (GridCoverage2D) processor.doOperation(param);
}
Here I get "Bursa wolf parameters required" error. I think that's because EPSG:4054 and EPSG:4326 are based on the different ellipsoids (Hughes 1980 and WGS84). What is the proper way to do this?