Dear Simone, Martin,
yes, it is unfortunate - but while I will push for a change of the 
server, it is not a solution in the short term (deadlines!). Simone, if 
you have a simple code to do the shifting, please, could you share it?
I tried searching for something like that, but I am not confident enough 
that I got it right. I would first coverage.evaluate to get the byte[] 
with the values for all the bands, and then somehow couple them togethe 
using something like:
java.nio.ByteBuffer buf = ByteBuffer.wrap(b);    
return buf.getFloat();


Is it correct?

Cheers
Martin

Simone Giannecchini wrote:
> Ciao Martin,
> please read below...
>
> -------------------------------------------------------
> 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 11:28 AM, Martin Tomko <martin.to...@geo.uzh.ch> 
> wrote:
>   
>> Hi Martin,. Simone,
>> I have asked at the deegree list, and this is the response I got from
>> Andreas:
>>
>> <quote>
>> this is the way the WCS works.
>> One reason for this is Java or better
>> ImageIO, JAI and Batik which are used by deegree for handling TIFFs.
>> According to these libs it is possible to create a one band TIFF with
>> FLOAT or DOUBLE data type but you can't read them with these libs. This
>> may sounds strange but unfortunately it is like this (if somebody knows
>> a solution we would be gratefull). Therefore we use a four band TIFF
>> where each byte of a float value (e.g. DEM) is written to one of the
>> bands. An application can read the TIFF as image an reconstruct the
>> float values by combining the four  bytes of each pixel.
>> </quote>
>>     
>
> I guess I need to subscribe to the deegree ml and tell them about
> imageio-ext, where we fixed those problems :-).
>
>
>   
>> I asked for a more exact specification of the transformation. I have
>> personally NO experience with handling colors in such situations, and I
>> hope that a solution is possible - we are sort of dependent on the WCS...
>> Martin
>>     
>
> Well, if you can, I would switch to geoserver or mapserver for wcs,
> you should not have these problems.
> If you *have* to use deegree you need to reconstruct the correct
> geotiff, pixel by pixel, but this highly not standard.
> If you want the code to go from 4 bytes to float or from 8 bytes to
> double I can pass it over.
>
> Simone.
>
>
>   
>> Simone Giannecchini wrote:
>>     
>>> Ciao,
>>> michael, Id' take into account that much probably the RGBA data was
>>> created using a colormap like approach, hence band combination won't
>>> do, unfortunately.
>>> I guess that the point is understanding why the data became RGBA at
>>> the WCS stage when the suorce data was a dem.
>>>
>>> Of course, this is mho :-)
>>>
>>> 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 11:03 AM, Michael Bedward
>>> <michael.bedw...@gmail.com> wrote:
>>>
>>>       
>>>> Hi Martin,
>>>>
>>>> I can't help at all with the WCS aspect of this question (I know
>>>> nothing) but as to converting the coverage you have into a single band
>>>> version (as a last resort solution): if you know the details of the
>>>> calculation used to create the four bands you can run that in reverse
>>>> with a JAI BandCombine operation.
>>>>
>>>> Michael
>>>>
>>>> ------------------------------------------------------------------------------
>>>> 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
>>>>
>>>>
>>>>         
>>>
>>>       
>> --
>> Martin Tomko
>> Postdoctoral Research Assistant
>>
>> Geographic Information Systems Division
>> Department of Geography
>> University of Zurich - Irchel
>> Winterthurerstr. 190
>> CH-8057 Zurich, Switzerland
>>
>> email:  martin.to...@geo.uzh.ch
>> site:   http://www.geo.uzh.ch/~mtomko
>> mob:    +41-788 629 558
>> tel:    +41-44-6355256
>> fax:    +41-44-6356848
>>
>>
>> ------------------------------------------------------------------------------
>> 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
>>
>>     
>
>
>   


-- 
Martin Tomko
Postdoctoral Research Assistant 
    
Geographic Information Systems Division
Department of Geography
University of Zurich - Irchel
Winterthurerstr. 190
CH-8057 Zurich, Switzerland

email:  martin.to...@geo.uzh.ch
site:   http://www.geo.uzh.ch/~mtomko
mob:    +41-788 629 558
tel:    +41-44-6355256
fax:    +41-44-6356848


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