I am trying to do the interpolation of GRASS vector shapefiles using GRASS plugin tools. My objective is to run interpolation tool in GRASS plugin from OSGEO4W command line, which will help me automate the process in my project.

I have found an article on how to do this, but it seems to work for QGIS tools and I don't know how to access the GRASS tools in a manner similar to that mentioned in this website. The website URL is as below:


So if anyone has an idea as to how to do this, please help me out with this.

1 Answer 1


to run grass tools from the command line, I don't know how to do it through OSGEO4W shell but I figured out that we can do it through the grass shell inside the grass plugin.

just go to OPEN GRASS TOOLS -> Under Modules Tree -> GRASS Modules -> shell - Grass shell

inside this grass shell call your file e.g if your file is 'SampleCommand.sh' file then, you write in the command line "sh SampleCommand.sh". This command runs your '.sh' extension file which has the code for the GRASS tool to be run. In my case my 'SampleCommand.sh' file had the following code:

echo "Processing your IDWInterpolation$f"
v.surf.idw input=NewABDWellPoints@NewABD layer=1 

column=Saturation npoints=4 power=2.0 


This code "v.surf.idw input=NewABDWellPoints@NewABD layer=1 column=Saturation npoints=4 power=2.0 output=SampleIDWInterpol_duplicate_cmd01" can be obtained from your grass tools OUTPUT window. The OUTPUT window of grass tools show your exact command that it had called to run your tool.

This way you can generate outputs through GRASS Shell command line and when you have 1000(s) of files to process, you can loop through in your 'SampleCommand.sh' file and run it in a single command. You are done!!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.