Hi

Sorry to dig up an old thread but I'm getting this problem on both 
windows and a linux. I'm deploying with maven and have the pure java 
jars as dependencies (jai_core, jai_codec, jai_imageio).
I've been using geotools version 2.4.4 (possibly the problem has already 
been resolved in the development version). Anyway, in each case I can 
only perform the read if I've deployed the native libraries. The code I 
use is below, I think it's based on code from a tutorial.

ImageMosaicFormatFactory imfFact = new ImageMosaicFormatFactory();
ImageMosaicFormat fmt = (ImageMosaicFormat) imfFact.createFormat();
if (fmt.accepts(dataIndex)){
    ImageMosaicReader reader = (ImageMosaicReader) fmt.getReader(dataIndex);
    coverage = (GridCoverage2D) reader.read(null);
    reader.dispose();
}

Is there a pure java workaround for this?


Cheers Alistair


Michael Bedward wrote:
> Hi folks,
>
> Regarding this ImageIO / Mac problem - Gabriella and I chatted a bit
> further about it off the list.  The error comes from a call in
> WorldImageReader.java:
>
>    JAI.create("ImageRead"...
>
> to load the coverage raster from file.  The problem is that the
> ImageReadDescriptor class isn't in Apple's version of ImageIO.  I
> think on other platforms it is part of the native lib stuff (correct
> me if I'm wrong) and on the Mac there are only the pure Java
> components of ImageIO.
>
> But a bit of testing showed that Gabriella can read her jpeg file
> successfully using ImageIO functions directly.  So would it cause any
> problems if that were done in the WorldImageReader class and the
> analagous code in the WorldImageWriter class ?
>
> Michae
>
>
>
> On Sun, May 11, 2008 at 9:47 AM, Gabriella Turek <[EMAIL PROTECTED]> wrote:
>   
>> Ooops, you're right I did not have jai-image-io installed. But here's the
>> funny thing:
>> I downloaded it (the linux version, I suppose it doesn't matter) and
>> installed it in /System/Library/Java/Extensions but I still get the same
>> error message.
>> I then looked at my classpath and I remember having to add the other jai jar
>> files expressly to it
>> to make my demo work (except for this error).  So I also added the
>> jai-imageio.jar file expressly  to the classpath, and I still get the error.
>> I am running 10.4.11 in my PPC powerbook, java version 1.5.0_13
>> gaby
>>
>> --
>> *******************************************************************************
>> **   Anyone who has the power to make you believe absurdities has      **
>> **   the power to make you commit injustices  - Voltaire (1767)
>>     **
>> *******************************************************************************
>>
>>
>>
>>
>>
>>     
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
>   

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to