On Thu, Sep 19, 2019 at 12:36 AM Rich Shepard <rshep...@appl-ecosys.com> wrote: > > 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 > > Moritz, > > 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 from > 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 setting > 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 followed > by r.proj in other locations.
within a running GRASS session, you can switch the mapset (and location) with g.mapset HTH, Markus M > > Thanks for the pointers, > > Rich > > > > _______________________________________________ > grass-user mailing list > grass-user@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user