Ciao Amy,
first of all my apologies for not being able to answer before.

For the rest of this answer I am assuming you will work on geotools
2.3.x or successive. If not, please, let me know and I will write a
new answer.

WorldImage plugin implements the GridCoverage interface from OGC which
is deprecated. Anyway all the coverage plugins extend an abstract
class called AbstractGridCoverage2DReader which implements itself the
GridCoverageReader interface adding some missing functionalities to
it.

The key for you is to make use of this class instead of the
GridCovearageReader interface since with this class you can do all you
could do with the deprecated interface and more.

The following snippet can tell you more or less how to get a coverage
from a jpeg+jpw without evening knowing that you are using
WorldImageReader.

                // get the format
                final AbstractGridFormat format = ((AbstractGridFormat) 
GridFormatFinder
                                .findFormat(source));
                assertNotNull(format);
                //get the reader, where hints can be null
                final AbstractGridCoverage2DReader wiReader =
(AbstractGridCoverage2DReader) format
                                .getReader(source, hints);

                // get the coverage, you might supply hints to control decoding
                final GridCoverage2D coverage = (GridCoverage2D) 
wiReader.read(null);


I can guarantee that this code won't change on 2.3.x, the only thing
that can happen is that we might provide more hints and parameters to
better control ncoding and decoding, but the baseline code will never
change.


About plans.
I am actually working, along with Alessio Fabiani, on the 2.3.x branch
of geotools in order to shape up as much as possible coverage
management for the Geoserver 1.5.x. This work is what I call "stable"
development which means NO significative API shift but mainly
contribution of new plugins (ECW, PNM, JPEG2K, netCDf, GRIB, HDF, E00
binary grids, etc..) respecting existing API, bug fixes and tools to
process coverages. In the plan we have the work item of splitting
WorlImageReader on a per-format basis (tiff, jpeg, gif, etc...) in
order to better handle things that format-specific. Don't be afraid if
you code the way I showed you above
you will actually never notice any of the changes I have introduced
here above because the API will not change.

As far as taslking about next versions of GeoTools, we are (slowly)
working on the possibility to manage ND coverages (x,y,z,t,bands) in a
more coherent way as well on the possibility to go beyong the
GridCoverageExchange interface which is in my opinion pretty bad. But
this is r&d work that has to going on under the hood while trying to
break compatibility as less as possible (btw fundings are well
appreciated). An early prototype of these interfaces should be ready
in january, but I would not take it as granted (again, depends on
fundings).

Regards,
Simone.

On 10/18/06, Jody Garnett <[EMAIL PROTECTED]> wrote:
> Amy Johnson wrote:
> > Hello:
> >
> > I am interested in using WorldImageReader to read a .jpg. I saw that it
> > implements GridCoverageReader, and that GridCoverageReader will be
> > changed drastically. Does that mean WorldImageReader will also? If so,
> > is there an alternative?
> >
> Amy, we kind of "made up" GridCoverageReader (we looked at an OGC
> standard that has since fallen into disuse).
> If you have any suggestions on what you would like to see please let us
> know - or your can join in when
> we start up this work.
>
> Regards,
> Jody
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>


-- 
-------------------------------------------------------
Eng. Simone Giannecchini
President /CEO GeoSolutions

http://www.geo-solutions.it

-------------------------------------------------------

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to