GRASS and windows console: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
No edit summary
(add link to python modules)
Line 5: Line 5:
In order to ease the workflow of analysis, several GRASS modules can be invoked at once by an batch file (*.bat) in the winGRASS windows console.
In order to ease the workflow of analysis, several GRASS modules can be invoked at once by an batch file (*.bat) in the winGRASS windows console.


Python grass modules (e.g. v.db.addcolumn) have to be invoked by ''call'' in the batch-file.
[https://trac.osgeo.org/grass/browser/grass/trunk/scripts Python grass modules] (e.g. v.db.addcolumn) have to be invoked by ''call'' in the batch-file.


<source lang="bat">
<source lang="bat">

Revision as of 08:39, 15 June 2017

This page shows an example how to run several GRASS modules in a windows batch-file in the winGRASS windows console

Windows batch files in GRASS

In order to ease the workflow of analysis, several GRASS modules can be invoked at once by an batch file (*.bat) in the winGRASS windows console.

Python grass modules (e.g. v.db.addcolumn) have to be invoked by call in the batch-file.

@ECHO ON
g.region -p
v.in.region output=myreg
call v.db.addtable map=myreg
call v.db.addcolumn map=myreg columns="col1 double"
v.to.db map=myreg option=area columns=col1