[GRASSLIST:5550] Fwd: Re: Command-line invocation

Michael Ash mash at econs.umass.edu
Fri Feb 14 02:14:20 EST 2003


Thank you very much for the information.  

I had originally asked if it was possible to start GRASS from the command line with a script because I have to process multiple mapsets.  I would prefer to avoid manually starting and restarting GRASS between runs of a GRASS script because the number of mapsets is fairly large (the countries of Africa).

As it turns out, it is possible to change mapsets within a GRASS session.  See the other reply to my message for details, but the GRASS bash shell script I will run is:

for j in <list of countries> do;
  g.gisenv set=MAPSET=$j;
  for i in <list of vectors> do;
    v.support $i;
  done;
done;

I will probably generate the <list of countries> and <list of vectors> with file listings, wildcards, and extraction.  (See the bash documentation for details.)

Thank you to GRASSLIST for the information on g.gisenv and the very helpful basis for the script.

Best regards,

Michael Ash, Assistant Professor
  Of Economics and Public Policy
Department of Economics and CPPA
University of Massachusetts
Amherst, MA 01003
Tel 413-545-6329 Fax 413-545-2921
Email mash at econs.umass.edu
http://people.umass.edu/maash




More information about the grass-user mailing list