Dear All,
I am reading an input from a WCS (a DEM served in output format GeoTiff,
the server is Deegree). From the WCS response I construct a
GridCoverage2D as follows:
(removed all error handling etc):
BufferedImage image = image = ImageIO.read(url);
WritableRaster inputRaster = image.getRaster();
GridCoverageFactory gcFactory = new GridCoverageFactory();
GridCoverage2D gc = gcFactory.create("inputraster",
inputRaster,refenv);
The problem is that the returned Geotiff (and therefore the resulting
GridCoverage2D) has 4 bands (according to gdalinfo):
C:\temp>gdalinfo services.tiff
Warning 1: GeoTIFF tags apparently corrupt, they are being ignored.
Driver: GTiff/GeoTIFF
Files: services.tiff
Size is 32, 23
Coordinate System is `'
Origin = (7.144115994361721,46.002000642169747)
Pixel Size = (0.000805259045624,-0.000782660609417)
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 7.1441160, 46.0020006)
Lower Left ( 7.1441160, 45.9839994)
Upper Right ( 7.1698843, 46.0020006)
Lower Right ( 7.1698843, 45.9839994)
Center ( 7.1570001, 45.9930000)
Band 1 Block=32x8 Type=Byte, ColorInterp=Red
Band 2 Block=32x8 Type=Byte, ColorInterp=Green
Band 3 Block=32x8 Type=Byte, ColorInterp=Blue
Band 4 Block=32x8 Type=Byte, ColorInterp=Undefined
I am wondering if it is at all possible to get back to the Geotiff DEM
values from the Red, Gren, Blue and undefined components of the response
geotiff. If yes, how? I was under the impression that WCSs should return
unprocessed (raw) values for a coverage, unless otherwise specified, and
we did not specify any symbolization on the WCS.
Any hint welcome, including changing the output of the wcs used to a
different format.
Thanks,
Martin
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users