[GRASSLIST:252] Re: Grass interface to other languages

Glynn Clements glynn.clements at virgin.net
Thu May 29 21:03:57 EDT 2003


Matt Doggett wrote:

> I wrote the following subroutine to configure the PERL environment to
> execute Grass commands. All you'd have to do is call the subroutine with
> your GISDBASE, LOCATION, and MAPSET.  Then you would be able to invoke
> any grass command via the system command (e.g. system "r.mapcalc
> \'newgrid=sin(a)+cos(b)\'"); )

>     $ENV {'LOCATION_NAME'}=$LOCATION_NAME;
>     $ENV {'MAPSET'} = $MAPSET;
>     $ENV {'LOCATION'} = $LOCATION;

FWIW, there is no need to do this for 5.0.0 and later. These settings
are always read from $GISRC, not the environment.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-user mailing list