Martin, thank you for your aswers!<br><br>I&#39;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.<br>

<br>This is the line where I get the error and a copy of the console output:<br><br><b>        GridCoverage2D gridCoverage2D = this.create(fileName,raster,envelope2D);</b><br><br><i>Exception in thread &quot;main&quot; java.lang.IllegalAccessError: org.geotoolkit.coverage.grid.GeneralGridEnvelope.clone()Ljava/lang/Object;<br>
    at org.geotoolkit.coverage.grid.GeneralGridGeometry.clone(GeneralGridGeometry.java:385)<br>    at org.geotoolkit.coverage.grid.GeneralGridGeometry.&lt;init&gt;(GeneralGridGeometry.java:367)<br>    at org.geotoolkit.coverage.grid.GridGeometry2D.&lt;init&gt;(GridGeometry2D.java:464)<br>
    at org.geotoolkit.coverage.grid.GridGeometry2D.&lt;init&gt;(GridGeometry2D.java:451)<br>    at org.geotoolkit.coverage.grid.GridCoverageFactory.create(GridCoverageFactory.java:553)<br>    at org.geotoolkit.coverage.grid.GridCoverageFactory.create(GridCoverageFactory.java:349)<br>
    at org.geotoolkit.coverage.grid.GridCoverageFactory.create(GridCoverageFactory.java:291)</i><br><br><br><br><br>Do you have any idea of what&#39;s causing it?<br><br>Cheers,<br>Felipe.<br><br><br><div class="gmail_quote">
2009/5/14 Martin Desruisseaux <span dir="ltr">&lt;<a href="mailto:martin.desruisseaux@geomatys.fr" target="_blank">martin.desruisseaux@geomatys.fr</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello Felipe<br>
<br>
Felipe Quintella Correia a écrit :<div><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;m starting to develop with Geotoolkit, and I&#39;m integrating it with OrbisGIS (developed by IRSTV). We&#39;re changing our data model to work with GridCoverage and in the near future, be able to read large files.<br>


<br>
I&#39;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&#39;m having problems working with the metadata and constructing the envelop needed.<br>


</blockquote>
<br></div>
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.<div>

<br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;m thinking of using a GeographicMetadata instance, but I&#39;m not sure how I should proceed. If I construct the GeographicMetadata from the fileReader storing the image&#39;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?<br>


</blockquote>
<br></div>
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).<br>


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

<font color="#888888">
<br>
        Martin<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Felipe Quintella<br>