[geotk] Change the CRS of an existing GridCoverage2D

Fabien Carrion fabien.carrion at gmail.com
Fri Feb 25 16:52:37 EST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

After doing the
http://www.geotoolkit.org/modules/coverage/faq.html#changeCRS I get:

Exception in thread "main"
org.opengis.geometry.MismatchedDimensionException: Argument "gridRange"
has 2 dimensions, while 3 was expected.
	at
org.geotoolkit.coverage.grid.GeneralGridGeometry.ensureDimensionMatch(GeneralGridGeometry.java:439)
	at
org.geotoolkit.coverage.grid.GeneralGridGeometry.<init>(GeneralGridGeometry.java:287)
	at
org.geotoolkit.coverage.grid.GridGeometry2D.<init>(GridGeometry2D.java:283)
	at
org.geotoolkit.coverage.grid.GridGeometry2D.<init>(GridGeometry2D.java:240)
	at
org.geotoolkit.coverage.grid.GridCoverageFactory.create(GridCoverageFactory.java:592)
	at NamNetcdfImageReader.main(NamNetcdfImageReader.java:250)

I created my dimensions
GridSampleDimension dimension = new GridSampleDimension(description, new
Category[] {
        Category.NODATA,
        new Category(description, colorPalette, sampleValueRange, range)
     }, unit);
dimension = dimension.geophysics(true);

and I have
Dimensions RenderedSampleDimension("Albedo":[6.0 ? 79.3 %])
  ? GeophysicsCategory("Albedo":[6.0 ... 79.30000305175781])
    GeophysicsCategory("No data":[NaN(0...0)])

Where can I find the dimension which is missing?

Thanks

- -- 
Fabien Carrion

()  Campagne du ruban ASCII -- Contre les mails en html
/\  contre les pieces-jointes Microsoft
Web: http://fabien.carrion.free.fr/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1oJKAACgkQTe/bvZWuSM/EbACgprQmFrjg+KvTFOCOvvKuqMaY
+gkAn1acNfpjqgiIuSz0x8xlBh4a3VF5
=z0Wq
-----END PGP SIGNATURE-----


More information about the Geotoolkit mailing list