[Geotoolkit] GeographicMetadata

Felipe Quintella Correia felipequintella86 at gmail.com
Fri May 15 04:26:08 EDT 2009


Martin, thank you for your aswers!

I've started creating my file readers and everything was going ok, but when
I try to create the GridCoverage2D itself, using a GridCoverageFactory and
the method create(String, WritableRaster, Envelope), I get a
IllegalAccessError being thrown.

This is the line where I get the error and a copy of the console output:

*        GridCoverage2D gridCoverage2D =
this.create(fileName,raster,envelope2D);*

*Exception in thread "main" java.lang.IllegalAccessError:
org.geotoolkit.coverage.grid.GeneralGridEnvelope.clone()Ljava/lang/Object;
    at
org.geotoolkit.coverage.grid.GeneralGridGeometry.clone(GeneralGridGeometry.java:385)
    at
org.geotoolkit.coverage.grid.GeneralGridGeometry.<init>(GeneralGridGeometry.java:367)
    at
org.geotoolkit.coverage.grid.GridGeometry2D.<init>(GridGeometry2D.java:464)
    at
org.geotoolkit.coverage.grid.GridGeometry2D.<init>(GridGeometry2D.java:451)
    at
org.geotoolkit.coverage.grid.GridCoverageFactory.create(GridCoverageFactory.java:553)
    at
org.geotoolkit.coverage.grid.GridCoverageFactory.create(GridCoverageFactory.java:349)
    at
org.geotoolkit.coverage.grid.GridCoverageFactory.create(GridCoverageFactory.java:291)
*




Do you have any idea of what's causing it?

Cheers,
Felipe.


2009/5/14 Martin Desruisseaux <martin.desruisseaux at geomatys.fr>

> 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
>



-- 
Felipe Quintella
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geotoolkit/attachments/20090515/614c48f1/attachment.html


More information about the Geotoolkit mailing list