[GRASS-user] running Grass in batch mode without a script

Tyler Smith tyler at plantarum.ca
Fri Jan 30 11:27:23 PST 2015


On Wed, Jan 28, 2015, at 04:14 PM, Markus Neteler wrote:
> On Wed, Jan 28, 2015 at 9:50 PM, Tyler Smith <tyler at plantarum.ca> wrote:
> ...
> > So is there a way to run a grass job in batch mode without invoking a
> > script?
> 
> Yes, you just need to set some environment variables, see e.g. here:
> 
> http://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly#Bash_examples_.28GNU.2FLinux.29
> 

Thank you Markus. I realized that to use it that way I'd have to
determine what kind of file was being selected, in order to know if I
needed to call r.in.gdal or v.in.ogr. In the end it turned out to be
simpler to redo the code that calls the grass program itself, so I could
take advantage of 'grass -c file' and avoid that step. It appears to
work now, although I haven't given it much testing.

Best,

Tyler


More information about the grass-user mailing list