I am not sure your single band geotiff *has* color information? Usually you
would setup a raster symbolizer to map coverage values to a color? I
recommend stopping the application in the debugger and exploring the
resulting image and color model to see if you can determine what is going
on.




--
Jody Garnett

On 2 June 2015 at 06:21, ashwinD12 . <winas...@gmail.com> wrote:

> I have a single band GEOTIFF file that represents land cover information.
> I need to extract the following information from the GEOTIFF file
>
> 1) Whether it is big-endian or little -endian format
> 2) The land cover type corresponding to each latitude/longitude pair.
> 3) I also need to extract the color palette corresponding to each
> latiitude/longitude pair.
>
> GridCoverage2DReader reader = new GeoTiffReader(file);GridEnvelope dimensions 
> = reader.getOriginalGridRange();GridCoordinates maxDimensions = 
> dimensions.getHigh();int w = maxDimensions.getCoordinateValue(0)+1;int h = 
> maxDimensions.getCoordinateValue(1)+1;
>
> This is as far as I have gotten so far.
>
> Would a nested FOR loop over the width and height  give me the information I 
> need ?
>
> I apologize if this is too basic a question but I have tried all other 
> options.
>
>
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> GeoTools-GT2-Users mailing list
> GeoTools-GT2-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
------------------------------------------------------------------------------
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to