[GRASS-user] r.in.mat - How can I specify a No Data Value?

Hamish hamish_b at yahoo.com
Tue Mar 11 17:38:46 EDT 2008


> Bernhard wrote:
> > i'd like to export an elevation raster from Octave to Grass.
> > From my available data, I can't provide a height value for every
> > cell, so I need to use a No Data value here.
> > The import of the .mat file works fine, as described in the
> > manuals.
> > Only the No Data Value (set to -9999 in Octave) isn't interpreted
> > correctly, and that gives me an artificial "Mariana Trench" around
> > my defined area ;)

how did you set the No Data Value? Just arbitrarily called it -9999?

> > Where can I set the No Data value to be used? Can I define it for a
> > specific raster map? A standard value for the whole mapset? Or do I
> > have to use a special value in Octave/Matlab in the first place?

If you set those values to NaN (not a number) in Octave then r.in.mat
should convert those to NULL. See the NOTES section of the help page.
Or was there a problem with that?

Tom answered:
> I think you're looking for the GRASS program "r.null" and its
> "setnull" option.  That will designate pixels of a specified value
> as being NULL instead of valid numbers.
> 
> r.null map=mymap setnull=-9999


Hamish




      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 




More information about the grass-user mailing list