[GRASS-windows] grass start bat in windows
Glynn Clements
glynn at gclements.plus.com
Sun Jan 31 22:39:59 EST 2010
maven apache wrote:
> I want to write a bat to starat grass in command line .
>
> Thant's to say how to set the environment variables and grass vairables in
> the bat file.
>
> In fact I want to call garss in my java web application, so I think if I can
> write a bat to start grass, then I can do the same job(set envrionment
> variables) in my codes, then call garss.
>
> Is there anyone who has same experience?
Try something like the following:
set WINGISBASE=C:\GRASS-64-SVN
set GISBASE=C:/GRASS-64-SVN
set PATH=%WINGISBASE%/bin;%WINGISBASE%/lib;%PATH%
set GRASS_MESSAGE_FORMAT=silent
set GIS_LOCK=0
set GRASS_VERSION=6.5.svn
WD=...
UNIQUE=...
set GISRC=%WD%/gisrc_%UNIQUE%
copy %WD%\grassrc6 %GISRC%
rem create a new mapset for this session
g.mapset -c mapset_%UNIQUE%
You will need to set WD to a working directory, and set UNIQUE to a
unique value for each session (on Unix, $$ contains the PID of the
shell process; you'll need to figure out something for Windows).
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-windows
mailing list