[GRASS-user] Re: [GRASS-dev] gdal import an nodata cells

Hamish hamish_nospam at yahoo.com
Mon Jul 23 01:45:57 EDT 2007


Michael Perdue wrote:
> > If not, does gdal_translate understand this when it converts a file
> > stored as float64 to float32?  gdal_translate allows one to define
> > what the no-data value is, but how do I tell it to change the input
> > no-data value to a different output no-data value? IE, the no-data
> > value in my surfer file is a double precision nan, but I want the
> > no-data value in my output GeoTiff (float32) to be -32767. -a_nodata
> > changes the header no-data definition but does not change the values
> > of the pixels that represent no-data.
Frank wrote:
> I'm not aware of a practical way of doing this. Sorry.
> You are likely best off fixing this up in GRASS which is more
> flexible.

If it's a corner case, running r.null after r.in.gdal is preferable.

If this is likely to be a common need, a new option could be added to
r.in.gdal for it.


aka send a patch or wait for a devel to be bugged by it too. If you
feel the feature really should be in r.in.gdal, please file a code
request wish for it in the bug tracker and maybe someone will take it
up.


Hamish




More information about the grass-user mailing list