[GRASS-user] Script fails; manual entry works
markus.metz.giswork at gmail.com
Wed Sep 18 23:59:47 PDT 2019
On Thu, Sep 19, 2019 at 12:36 AM Rich Shepard <rshepard at appl-ecosys.com>
> On Wed, 18 Sep 2019, Moritz Lennert wrote:
> > You cannot launch GRASS GIS within the script in this way. You have to
> > put the actual module calls into a script and then either
> > - launch GRASS GIS and from the GRASS command line launch the script, or
> > - follow
> > https://grasswiki.osgeo.org/wiki/GRASS_and_Shell#GRASS_Batch_jobs,
> > i.e. let the GRASS_BATCH_JOB variable point to your script
> Through a lot of trial-and-error I've learned that all I can batch are the
> commands run in a single location. For each row in the Ohio-system (A-H
> south to north) there are 8 columns and I was trying -- and failing -- to
> process each row (G1-G8) in a single batch file.
> I've learned that I can create a shell script file that creates eight new
> locations, one for each column in the row.
> But I cannot import then reproject (twice) in a single batch file because
> each action is done in a different location.
> What I need to do is create 24 batch files and run each manually by
> and unsetting the GRASS_BATCH_JOB environmental variable. This is actually
> longer than copying and pasting lines from the inclusive (but ineffective)
> batch file to the command line, invoking and exiting grass after all
> operations in a single location.
> I'll add a feature request for 8.x in trac to expand batch file processing
> so that commands such as r.in.gdal/r.import in one location can be
> by r.proj in other locations.
within a running GRASS session, you can switch the mapset (and location)
> Thanks for the pointers,
> grass-user mailing list
> grass-user at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-user