[Geotoolkit] GeographicMetadata

Martin Desruisseaux martin.desruisseaux at geomatys.fr
Thu May 14 06:18:41 EDT 2009


Hello Felipe

Felipe Quintella Correia a écrit :
> I'm starting to develop with Geotoolkit, and I'm integrating it with 
> OrbisGIS (developed by IRSTV). We're changing our data model to work 
> with GridCoverage and in the near future, be able to read large files.
> 
> I'm using a StreamImageReader to read the files and finnaly store them 
> into BufferedImages, so I can construct a GridCoverage2D using the 
> GridCoverageFactory, but I'm having problems working with the metadata 
> and constructing the envelop needed.

Just as a side note, using BufferedImage is a convenient starting point, but at 
some later stage if you want to handle big images you will need to make sure 
that your code handles the more generic RenderedImage interface instead than the 
specific BufferedImage class.


> I'm thinking of using a GeographicMetadata instance, but I'm not sure 
> how I should proceed. If I construct the GeographicMetadata from the 
> fileReader storing the image's stream, is it able to gather all the 
> necessary information, and even find the WorldFile (the one with the 
> geographic information), or do I need to find these file myself, and 
> them create the GeographicMetadata from this file?

GeographicMetadata can not read any data by itself. We need to create specific 
GeographicMetadata subclasses specialized for different file format. For now 
there is no such class (except for NetCDF, on a different code repository 
because not yet ready).

You need to read the Envelope in your own way. Once you have the envelope, 
GeographicMetadata can be used as a support class for expressing the envelope in 
an IIOMetadata object, which is a kind of XML tree. This is probably not useful 
for your need - it will be useful for a CoverageReader wrapping arbitrary 
ImageReader, but we are not yet there.

	Martin


More information about the Geotoolkit mailing list