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

Bernhard Dobmeier dobmeier at muc.zae-bayern.de
Wed Mar 12 05:58:16 EDT 2008


Hi Tom, Hi Hamish,

thanks for your replies! The r.null setnull option was what I was
looking for. Works great!

I set the No Data Value to -9999 because i'm gonna export the data from
grass to a pollutant propagation simulation that expects -9999 as
NoDataValue by default.

For the export of the map for simulation the r.null map=mymap null=-9999
option will be the right tool.

Thanks and Cheers

Bernhard

Am Dienstag, den 11.03.2008, 14:38 -0700 schrieb Hamish:
> > 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 
> 
> 
-- 
--

Dipl.-Ing.
Bernhard Dobmeier

Bayerisches Zentrum für Angewandte Energieforschung e.V.
ZAE Bayern

Abteilung 1 : Technik für Energiesysteme und Erneuerbare Energien

                      -Arbeitsgruppe Biomasse-

 

Adresse     : Walther-Meissner-Straße 6, D-85748 Garching
Telefon     : 089 / 329442-83 
Telefax     : 089 / 329442-23
E-Mail      : dobmeier at muc.zae-bayern.de

http://www.zae-bayern.de <http://www.zae-bayern.de> 



More information about the grass-user mailing list