[GRASS-windows] grass start bat in windows

maven apache apachemaven0 at gmail.com
Mon Feb 1 00:05:07 EST 2010


2010/2/1 Glynn Clements <glynn at gclements.plus.com>

>
> 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%
>
This is my bat:
-----------------------
*set WINGISBASE=F:\anzhuang\GRASS-6-SVN
set GISBASE=F:\anzhuang\GRASS-6-SVN
set PATH=%WINGISBASE%/bin;%WINGISBASE%/lib;%PATH%
set GRASS_MESSAGE_FORMAT=silent

set GIS_LOCK=0
set GRASS_VERSION=6.5.svn

set WD=C:/Documents and Settings/Administrator

set GISRC=%WD%/grassrc6

rem create a new mapset for this session
g.mapset -c mapset_a*
-----------------------
I wonder the unique parameter is required or optional,however this bat does
not work. It seems that some libraries are  not added.

>
> 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>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-windows/attachments/20100201/4ed86d57/attachment.html


More information about the grass-windows mailing list