[geotk] VerticalCRS transformation

Martin Desruisseaux martin.desruisseaux at geomatys.fr
Wed Mar 9 18:11:03 EST 2011


Le 09/03/11 23:25, Aaron Braeckel a écrit :
> 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)
> ...
> Caused by: javax.vecmath.SingularMatrixException: cannot invert matrix
> ...
>
> 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]]

I suspect that the matrix is considered non-invertible because of the Double.NaN 
value in the 4th matrix row (the � symbol in above WKT). Geotk puts a NaN as the 
scale factor for dimensions for which CoordinateSystem1D.isRegular() 
<http://www.unidata.ucar.edu/software/netcdf-java/v4.2/javadoc/ucar/nc2/dataset/CoordinateAxis1D.html#isRegular%28%29> 
(from the UCAR API) returned false. Assuming we are not facing a Geotk bug, I 
would guess that the 4th dimension in your dataset is the time dimension and 
contains non-evenly spaced data.

Tomorrow, I will add some code logic for making matrix inversions more tolerant 
to NaN values. It will hopefully be done by the end of the day (I know precisely 
how to do that).

     Regards,

         Martin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geotoolkit/attachments/20110310/7016e45c/attachment.html


More information about the Geotoolkit mailing list