We don't have a client api for WCS yet; I imagine you can use a GET
request as you otutline below but it has been sometime since I have
personally tried them out using URLs rather than files as the object.
Oh I think you can pass the URL into the reader that than the raw input
stream...
My guess is you are in for a fun day of debugging.
Jody
> 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
>
-------------------------------------------------------------------------
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