5

How do I use the GRASS command line tools within QGIS?

I use the QRASS plugin to open the mapset, and then I open the GRASS tools window. I click on 'GRASS shell' under modules and it brings up a bash terminal, which says:

bash: /sw/bin/init.sh: No such file or directory
bash-3.2$

I assume init.sh was supposed to open some GRASS command line program, but it failed to find it.

I'm trying to teach myself GRASS using the third edition of "Open Source GIS: A GRASS Approach" by Neteler and Mitasova. Unfortunately it appears that the book is somewhat out of date, designed for GRASS 6-3, while I have GRASS 6-4. This means that some of the GUI stuff doesn't work (particularly d.mon, I believe it has to do with a new Python WxGUI interface) so I can't work through following the examples exactly. I'm hoping that the book will still be mostly relevant in terms of the modules available and the basic GRASS command syntax and use, but I can't follow the instructions that relate to the GUI. For this reason I've decide to ignore the GRASS GUI completely and to just use the QGIS GRASS plug in.

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Feb 20, 2013 at 20:58
0

1 Answer 1

3

Once you open the GRASS shell, all you have to do is enter the GRASS commands, such as r.in.gdal or r.mask. There should be no need to initialize GRASS. However, I am doing this on a PC, so it might be different with bash.

answered Feb 20, 2013 at 23:06

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.