Hi Martin,
the getMetadataNames is not supported in the AbstractGridCoverage2DReader
nor in the GeoTiffReader or ImageMosaicReader.

Anyway, what do you exactly mean with "Tiled tiff"?
Do you have a single "internally tiled" tiff file or do you have several
tiff files representing tiles of an image mosaic?
In the first case, I suggest to you to use the GeoTIFF reader.
Do you have any chance to share your data so I can check it?

Regards,
Daniele


On Wed, Feb 18, 2009 at 10:53 AM, Martin Tomko <[email protected]>wrote:

> Dear all,
> in current 2.5-Snapshot, I am unable to read metadata of a tiled tiff,
> read using the code below. Reading the javadoc, the operation should be
> supported. I am trying to get access to the nodata parameter, achievieng
> something similar to the geotiff reader's reader.getMetadata().getNoData();
> Is there any other way?
> Thanks
> Martin
>
> AbstractGridCoverage2DReader reader;
>            ImageMosaicFormatFactory imfFact = new
> ImageMosaicFormatFactory();
>            format = (ImageMosaicFormat) imfFact.createFormat();
>            if (format.accepts(file)){
>                reader = (ImageMosaicReader)  format.getReader(file);
> format.getReader(file);
>                String[] metas = reader.getMetadataNames();
>
>                for (int i=0;i<metas.length;i++){
>                    System.out.println(metas[i]);
>                }
>                try {
>
>                    coverage = (GridCoverage2D) reader.read(null);
>                    reader.dispose();
>                } catch (IOException ex) {
>                    ex.printStackTrace();
>                    return;
>                }
>
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
> CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> -Strategies to boost innovation and cut costs with open source
> participation
> -Receive a $600 discount off the registration fee with the source code:
> SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>



-- 
-------------------------------------------------------
Eng. Daniele Romagnoli
Software Engineer

GeoSolutions S.A.S.
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax:     +39 0584983027
mob:   +39 328 0559267


http://www.geo-solutions.it

-------------------------------------------------------
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to