[Geoserver-users] DerivedCRS and resample

Jan Jezek a écrit :

In recent days I was trying to apply RubberSheetTransform on coverage and I have some questions about that. The aim of my work is to apply rubbersheeting to get rid of 'small' deltas that stays even after global BursaWolf transformation. My idea was to define this as a Derived CRS from the real CRS that my dataset should be located in. So the code looks like this:

DerivedCRS derivedCRS = new DefaultDerivedCRS(DefaultOperationMethod(transformBuilder.getMathTransform()),
                  coverage.getCoordinateReferenceSystem(),
                  transformBuilder.getMathTransform(),
                  (CoordinateSystem)DefaultCartesianCS.GENERIC_2D);

GridCoverage result = (GridCoverage)operations.resample(coverage, derivedCRS);

Could you try the following add see what we get please?

System.out.println(CRS.findMathTransform(coverage.getCoordinateReferenceSystem(),
derivedCRS)?

I tried this just with affine transformation. I guess that I'll need to add a Provider to RubberSheeting to be able to make derived CRS with it. I'm going to do so soon...

I didn't had the time to think about this issue yet. Technically, creating a
DerivedCRS from a RubberSheetTransform should work. Conceptually, I'm not sure
that we are allowed to do that since RubberSheetTransform sound like a
"Transformation" rather an "Conversion" in ISO 19111 terms:

http://geoapi.sourceforge.net/pending/site/apidocs/org/opengis/referencing/operation/package-summary.html#package_description

and DerivedCRS are allowed only for Conversions, not Transformations. We may
need to extend the referencing module with a plugable mechanim for
transformations like RubberSheetTransform.

  Martin