Download Grass Tutorial

Transcript
Chapter 8. The Most Important Commands to Get Started
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
Using the GUI
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 Chapter 11.
Managing your maps
In order to list, copy and remove your maps, you can use g.list1, g.copy2, and
g.remove3. In the GIS Manager, these commands are in the GIS->Manage maps
and grid3D files menu.
For more information, see Chapter 17.
Setting the region
Before dealing with anything concerning your map, you should make sure that
the region is set correctly. To do so, use the command g.region4. 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 Chapter 12.
Displaying
The easiest way to do this is with the GIS Manager that you can start with the
command d.m&5 (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 x06. Then, run d.rast7 or d.vect8, 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.erase9.
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.
19