[GRASS-dev] [GRASS GIS] #2579: Specify command to be exectued as parameter of grass command
GRASS GIS
trac at osgeo.org
Tue Mar 10 01:45:37 PDT 2015
#2579: Specify command to be exectued as parameter of grass command
----------------------------------------------+-----------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.1.0
Component: Startup | Version: svn-trunk
Keywords: batch job, GRASS_BATCH_JOB, init | Platform: All
Cpu: Unspecified |
----------------------------------------------+-----------------------------
Comment(by rkrug):
Some remarks concerning the syntax:
1) I don't like the idea of having to repeat the mapset each time as it
will require quite a bit of typing and possible errors in longer scripts.
So the assumption to use the mapset which is in the rc file (i.e., if I am
correct, the one used before), would be quite useful.
2) Instead of using the normal `grass` command, I would suggest to
introduce a new command(e.g. {{{ggrassbatch}}}), which is taking only one
parameter: the command to be executed including the parameter. So it could
be used as
{{{grassbatch r.info}}}
3) The function {{{grassbatch}}} should accept, in addition to the normal
grass commands, one more command named e.g. {{{set.mapset}}} which is only
doing one thing, setting the mapset in the rc file, so this would be the
mapset to be used for all following {{{grassbatch}}} commands, unless the
mapset is changed.
So a script could look as followed:
{{{
grassbatch set.mapset ~/grassdata/nc_spm_08_grass7/user1
grassbatch .../test_script.sh
grassbatch r.info
grassbatch r.mapcalc "aaa = 5"
}}}
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2579#comment:8>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list