[geotk] VerticalCRS transformation
Aaron Braeckel
braeckel at ucar.edu
Wed Mar 9 17:25:43 EST 2011
Hi Martin
On 03/09/2011 03:27 AM, Martin Desruisseaux wrote:
> For all vertical CRS, use ellipsoidal height instead than geoidal height.
> Geotk should work fine for all ellipsoidal heights. Inconvenient is that
> height values are less realist (an ellipsoidal height of -10 metres for
> instance may actually be 200 metres above the sea level). This is
> actually
> the approach I would recommand if you can easily change the vertical CRS.
When I retry this resampling operation with identical VerticalCRSs it
results in:
Caused by:
org.opengis.referencing.operation.NoninvertibleTransformException:
Transform is not invertible.
at
org.geotoolkit.internal.referencing.MatrixUtilities.invertSquare(MatrixUtilities.java:305)
at
org.geotoolkit.internal.referencing.MatrixUtilities.invert(MatrixUtilities.java:262)
at
org.geotoolkit.referencing.operation.transform.ProjectiveTransform.inverse(ProjectiveTransform.java:619)
at
org.geotoolkit.coverage.processing.operation.Resampler2D.reproject(Resampler2D.java:364)
at
org.geotoolkit.coverage.processing.operation.Resample.doOperation(Resample.java:249)
... 29 more
Caused by: javax.vecmath.SingularMatrixException: cannot invert matrix
at javax.vecmath.GMatrix.invertGeneral(GMatrix.java:1728)
at javax.vecmath.GMatrix.invert(GMatrix.java:416)
at
org.geotoolkit.internal.referencing.MatrixUtilities.invertSquare(MatrixUtilities.java:296)
... 33 more
I can reproduce this same issue more simply by calling:
ImageCoverageReader reader = new ImageCoverageReader();
reader.setInput( file );
GridCoverage cvg = reader.read( 0, null );
cvg.getGridGeometry().getGridToCRS().inverse(); //this throws
NoninvertibleTransformException
The behavior is the same whether or not I set the correct ProjectedCRS
or not. The result of cvg.getGridGeometry().getGridToCRS().toString() is:
PARAM_MT["Affine",
PARAMETER["num_row", 5],
PARAMETER["num_col", 5],
PARAMETER["elt_0_0", 20.318],
PARAMETER["elt_0_4", -3332.314824642418],
PARAMETER["elt_1_1", -20.318],
PARAMETER["elt_1_4", 3983.006785884024],
PARAMETER["elt_2_2", 304.8],
PARAMETER["elt_2_4", 3048.0],
PARAMETER["elt_3_3", �],
PARAMETER["elt_3_4", 1.0]]
Thanks,
Aaron
More information about the Geotoolkit
mailing list