IMHO this is a deegree related problem, once you go from raw data to a
rendered version is quite hard to go back to the original data, even
knowing the style that was applied.
If you asking a dem you should get numbers from WCS not colors.

Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041  Camaiore (LU)
Italy

phone: +39 0584983027
fax:      +39 0584983027
mob:    +39 333 8128928


http://www.geo-solutions.it
http://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

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



On Thu, Apr 30, 2009 at 10:29 AM, Martin Tomko <martin.to...@geo.uzh.ch> wrote:
> 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
> Geotools-gt2-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>

------------------------------------------------------------------------------
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
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to