Hello list,

after a long trial 'n' error session I finally could load a geotiff  
from disk into my webapp. Now I fail to get the same done via GeoServer.

I tried the following - without success:

URL tiffURL = new URL("http://localhost:1979/geoserver/wcs? 
service=WCS&...&format=GEOTIFF");
InputStream tiffIS = tiffURL.openStream();

GeoTiffFormat gtf = new GeoTiffFormat();
GeoTiffReader gtr = (GeoTiffReader) gtf.getReader( tiffIS );
GridCoverage2D gc = null;

try {
    gc = (GridCoverage2D) gtr.read(null);
    System.out.println("GeoTIFF successfully loaded.");
}
catch (Exception e) {
    System.out.println("ERROR: Could not load GeoTIFF.");
}

Is this a acceptable approach or am I completely wrong?
Which reader should I use aund how should I pass a WCS reference to  
this reader?


Thanks for any hint,

Christian 

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

Reply via email to