> On 25 Nov 2015, at 14:26, Andrea Aime <andrea.a...@geo-solutions.it> wrote:
> 
> On Tue, Nov 24, 2015 at 2:53 PM, Tore Halset <hal...@pvv.ntnu.no> wrote:
> Hello.
> 
> I am happily using GridCoverageRenderer to draw a color relief of my DEM 
> files. It works fine.
> 
> Now, I want GridCoverageRenderer to draw the raw elevation values (negative 
> since this is below sea level) instead of colors. Into a BufferedImage of 
> type TYPE_USHORT_GRAY. Is that possible or should I use something else than 
> GridCoverageRenderer?
> 
> I have tried to paint to a BufferedImage of type TYPE_USHORT_GRAY and with a 
> null RasterSymbolizer, but all of the values in the image are 0.0. Not the 
> (negative) values from the DEM.
> 
> Hi Tore,
> the GridCoverageRenderer "renders", that is, paints a map, if you want to 
> keep on using the raw values,
> I'm not aware of anything that will put them for you in a BufferedImage.
> But I don't understand why you'd want to do that in the first place, just get 
> the renderer image out
> of the grid coverage and use it as is?

Thank you Andrea.

I want to keep cropping and reprojecting as with GridCoverageRenderer, but to 
output raw values. This is for clients that does not want to further process 
the data in some way before display. 

> Do you need to reproject it? If so look at the CoverageProcessor, the 
> resample2d operation in particular.

Thank you! I am looking into this now.

Regards,
Tore Halset.
------------------------------------------------------------------------------
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to