HI:<br>I want to run grass in a command line model, however when I write a bat,it works just for 6.3 version , and some command can not work for example I can run g.version ,rather than r.fillnulls.<br>The grass variable bat is :<br>
-------<br>@echo off<br><br>rem *******Environment variables***********<br><br>rem Set GRASS Installation Directory Variable<br>set GRASSDIR=F:\anzhuang\GRASS<br><br><br>rem set GISBASE=D:\GrassDataBase<br><br>set GISRC=C:\Documents and Settings\Administrator\.grassrc6<br>
<br>rem Set Path to utilities (libraries and bynaries) used by GRASS<br><br>set PATH=%GRASSDIR%\msys\bin;%PATH%<br>set PATH=%GRASSDIR%\extrabin;%GRASSDIR%\extralib;%GRASSDIR%\extrabin;%PATH%<br>set PATH=%GRASSDIR%\tcl-tk\bin;%GRASSDIR%\sqlite\bin;%GRASSDIR%\gpsbabel;%PATH%<br>
set PATH=%PATH%;%GRASSDIR%\bin;%GRASSDIR%\lib;%GRASSDIR%\scripts;%GRASSDIR%\etc;%GRASSDIR%\sqlite\lib;%GRASSDIR%\sqlite\bin;<br><br><br>rem Path to the proj files (notably the epsg projection list)<br>set GRASS_PROJSHARE=%GRASSDIR%\proj<br>
----------<br><br>And I write a work bat :<br>---------<br>r.in.gdal input=D:\data\hdf5\new\OMI-Aura_L3-OMTO3e_2009m0729_v003-2009m0731t020127.tif output=aa location=al<br>g.gisenv set=LOCATION_NAME=al<br>g.region rast=aa<br>
r.null map=aa setnull=-1.267e+30--1.268e+30<br>r.fillnulls input=aa output=ab tension=40 smooth=0.1<br>r.out.gdal input=ab format=GTiff output=D:/OMI-Aura_L3-OMTO3e_2009m0729_v003-2009m0731t020127.tif<br>---------<br>It does not work, it tell me that the r.fillnulls is not a valide command.<br>
I wonder why?<br><br>In fact what I am trying to do is to call grass in my web application(like the web processing service),now I want to handle the hdf5 data,the following is my idea:<br>1) use gdalinfo to get the information of the he5,(the gdal model in grass 6.3 does not support this command, the 6.4 support)<br>
2) change the subdataset to geotiff, use gdal_translate<br>3) import the tiff to grass and create a new location according the tif<br>4) log in to the new location use g.gisenv<br>5) set some sepical cell data to null by using r.null....<br>
6) Interpolation the null data using r.fillnulls.<br>7) export the map to geotiff.<br><br>So anyone can give some advise?<br>