[GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

Helmut Kudrnovsky hellik at web.de
Fri Feb 15 07:33:34 PST 2013


>Helmut - can you please try this commands with data in nc_spm_08
>just pasting them in command console in wingrass? 

sure.

tested in the wxGUI-command console with:

System Info                                                                     
GRASS version: 6.4.3svn                                                         
GRASS SVN Revision: 55064                                                       
GIS Library Revision: 50937 (2012-02-25)                                        
GDAL/OGR: 1.9.2                                                                 
PROJ4: Rel. 4.8.0, 6 March 2012                                                 
Python: 2.7.2                                                                   
wxPython: 2.8.12.1                                                              
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)   

- working:

r.mapcalc
ndvi3=float(lsat7_2002_40-lsat7_2002_30)/float(lsat7_2002_40+lsat7_2002_30)
(Fri Feb 15 16:23:42 2013) Command finished (0 sec)  

r.mapcalc urban1_30m=if(landuse96_28m==1,1,0)+if(landuse96_28m==2,2,0)          
(Fri Feb 15 16:24:24 2013) Command finished (0 sec)   

- not working (as Anna mentioned caused by ||):

r.mapcalc urban2_30m=if(landuse96_28m==1 ||
landuse96_28m==2,landuse96_28m,null()
r.mapcalc MASK=if((elevation<100 && elevation>60) && (landuse96_28m==1 ||
landuse96_28m==2),1,null())







-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/formatting-expressions-for-r-mapcalc-in-GRASS6-4-3-tp5031381p5034574.html
Sent from the Grass - Dev mailing list archive at Nabble.com.


More information about the grass-dev mailing list