[GIS] How to get started with GRASS shell

grassshell

I'm a beginner in programming but i have to work with GRASS at work, and do it quickly.

I'm completely lost with all the variety of tutorials that are existing and to me, don't look the same…and nothing of them answer my basic questions (how to make very simple loops on multiple raster).

So I want to clarify where to start and what to use. I'm using GRASS with the 6.4.2 command line, under Windows 7 OS.

I don't know if I have to use Unix syntax or other, and I don't know if I have to directly use the Python shell more than the basic grass shell.

Anybody can help me to get started with very simple tutorials for using shell (loops, work with data from mapsets, using variables, import, export…) ?

Best Answer

GRASS is written in C and have a ctypes python lib and recently an improved high level python library called pygrass. see pygrass documentation here. To work with raster data please refer to raster section of pygrass.

I would suggest you to start with python than using shell programming because all shell scripts are ported to python for cross-platform compatibility.

grass is a multi binary package. Each module runs as a separate process. To do an analysis users just call these modules with correct parameters.

These examples shows how to run grass modules by code

Related Question