[GRASS5] r.in.gdal updates?

Markus Neteler neteler at itc.it
Thu Mar 13 07:49:46 EST 2003


On Mon, Mar 10, 2003 at 10:01:18AM -0500, Frank Warmerdam wrote:
> Markus Neteler wrote:
> > On Sun, Mar 02, 2003 at 06:53:56PM +0000, Glynn Clements wrote:
> >>> Markus Neteler wrote:
[...]
> >>>>Outstanding
> >>>> - fix the grey color tables issue for RGB maps
[...]
> I think Glynn is referring to the fact that GDAL doesn't return the
> real dynamic range of the original sensor.  For instance, an 11bit sensor
> would be represented via GDAL as 16 bit (depending on the format it is
> stored in of course), not 11.  So, of course GDAL returns information on
> the data type but GDAL can't transport the meaningful dynamic range of
> the original sensor since that isn't even available in most formats.
> 
> In short, if it is GDB_Byte assume a dynamic range of 0-255 otherwise the
> data should be sampled.

So far I have added a test for GDT_Byte:
if yes, then 
  G_make_grey_scale_colors (&colors, 0, 255);
is applied to the channel. The resulting color file contains then

% 0 255
0:0 255:255

Also I have added GDALGetColorInterpretationName() to write out
 channel.Red, channel.Green, channel.Blue
instead of
 channel.1, channel.2, channel.3
in case of a multi-channel image. This works as for 'gdalinfo'.

 - tested with GeoTIFF RGB.	-> channel.Red etc..
 - tested with GeoTIFF Palette	-> channel
 - tested with LANDSAT 7 CEOS	-> channel
 - tested with LANDSAT 7 FAST	-> channel.1, channel.2 ...
   (if ColorInterpretationName == Undefined, the channel number is used)

Outstanding issue:
The CELL compression - I don't know how to apply that suggestion
(Eric ?).

Please update directly in CVS if required.

Markus




More information about the grass-dev mailing list