[GRASS-user] Change NaN to 0 with r.mapcalc(or whatever)?

Moskovitz, Bob Bob.Moskovitz at conservation.ca.gov
Wed May 21 13:20:46 EDT 2008


NaN is an abbreviation for Not a Number.  Here is more info: http://en.wikipedia.org/wiki/NaN

I was able to solve my problem by doing this:  r.mapcalc "q50_eh_nonan = if(q50_eh != q50_eh,null(),q50_eh)"

> -----Original Message-----
> From: Daniel Victoria [mailto:daniel.victoria at gmail.com]
> Sent: Tuesday, May 20, 2008 5:26 PM
> To: Moskovitz, Bob
> Cc: Grass-User (E-mail)
> Subject: Re: [GRASS-user] Change NaN to 0 with r.mapcalc(or whatever)?
> 
> 
> If by NaN you mean null values, you are looking for the r.null command
> 
> Daniel
> 
> On Tue, May 20, 2008 at 9:11 PM, Moskovitz, Bob
> <Bob.Moskovitz at conservation.ca.gov> wrote:
> > Hello All,
> >
> > Is there a way to r.mapcalc or some other command to change 
> NaN values in
> > rasters to another value?
> >
> > Bob
> >
> > Bob Moskovitz
> > Seismic Hazard Zonation Project
> > California Geological Survey
> > http://www.conservation.ca.gov/cgs/shzp
> >
> > CONFIDENTIALITY NOTICE: This communication is intended only 
> for the use of
> > the individual or entity to which it is addressed. This 
> message contains
> > information from the State of California, California 
> Geological Survey,
> > which may be privileged, confidential and exempt from 
> disclosure under
> > applicable law, including the Electronic Communications 
> Privacy Act. If the
> > reader of this communication is not the intended recipient, 
> you are hereby
> > notified that any dissemination, distribution, or copying of this
> > communication is strictly prohibited.
> >
> > _______________________________________________
> > grass-user mailing list
> > grass-user at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/grass-user
> >
> >
> 


More information about the grass-user mailing list