So, you've managed to create a GRASS database and location and to import some data, and now you want to actually do something with it ? This chapter will help you get going very quickly with some of the basic operations in GRASS. Again this is not to replace further going sections later in this documentation, but only to allow you to plunge into the fun as quickly as possible.
Basic tasks and their commands
GRASS has a graphical user interface written in Tcl/Tk, the GIS Manager. This functions as a front end to all the GRASS modules. To start it type d.m& (the '&' allows you to keep on using the GRASS shell). The GIS Manager generate automatically a GUI for every modules. You can browse menus or type the name of a command without argument to lauch them.
For more information, see the chapter called Graphical User Interface.
For more information, see the chapter called Manage your data.
Before dealing with anything concerning your map, you should make sure that the region is set correctly. To do so, use the command g.region. Type g.region vect=NameOfYourVectorMap or g.region rast=NameOfYourRasterMap. This will set the 'current' region to the extension and the resolution of your map. Use g.region -p to display the current region settings.
You can access region settings in GIS->Region menu of the GIS Manager.
For more information, see the chapter called The GRASS Region.
The easiest way to do this is with the GIS Manager that you can start with the command d.m& (the '&' allows you to keep using the GRASS shell at the same time). You can add raster or vector layer using appropriate button on the buttons bar - respectively 10th and 11th button from left. After, you can choose the layer name by clicking on the "Raster name:" or "Vector name:" button in the lower part of the interface. Click on the first button of the buttons bar to display selected layers.
If you are more of the command line type, or don't want to use d.m for other reasons, GRASS provides you with all the commands needed for a happy experience. Launch a GRASS monitor with d.mon x0. Then, run d.rast or d.vect, depending on the type of map you want to display: d.rast NameOfYourRasterMap or d.vect NameOfYourVectorMap and your beauty should come up on the monitor. If you wish to erase the GRASS monitor use d.erase.
All these commands can also be launched from the GIS Manager. To start a monitor go to Display->Start displays->X0. To display a map go to Display->Display raster/vector maps. To erase the monitor go to Display->Erase active display/frame to selected color.
If you imported a raster file and GRASS created three files named NameOfYourRaster.1, NameOfYourRaster.2, and NameOfYourRaster.3, these probably represent the three bands of an RGB image. In that case, change the color map of these three files to greyscale (thus making the "intensities" of grey represent the "intensities" of the respective colors), using r.colors. For each of the three maps type r.colors map=NameOfYourRaster col=grey. Then you can use d.rgb to display the image: d.rgb r=NameOfYourRasterMap.1 g=NameOfYourRasterMap.2 b=NameOfYourRasterMap.3. In the GIS Manager go to Raster->Manage map colors->Set colors to predefined color tables and chose 'grey' in the list "Type of color table". Then display with Display->Display raster maps->Display RGB overlays.
For more information, see the chapter called Displaying Maps.
Use d.zoom for zooming and panning. (Beware: this resets your region settings !)
You can get help with the g.manual command.
If you wish to exit GRASS, close the open monitors either by clicking on the close button or by using d.mon stop=x0, replacing 'x0' with the name of whatever monitor you opened. In the GIS Manager go to Display->Stop displays. Then you can simply type exit in the command line and GRASS will close down.