Subsections

4 Structure of GRASS databases: the ``GRASS Project''

GRASS data are stored in a directory referred to as a database (also called ``GISDBASE''). This directory has to be created with mkdir or a file manager before starting to work with GRASS. Within this database, projects are organized by project areas stored in subdirectories called locations. A location is defined by its coordinate system, map projection and geographical boundaries. The subdirectories and files defining a location are created automatically when GRASS is started the first time with a new location.

Each location can have several mapsets. One motivation for maintaining different mapsets is to store maps related to specific project issues or subregions. Another motivation is to support simultaneous access by several users to the map layers stored within the same location, i.e. teams working on the same project. For team efforts, a centralized GRASS database would be created on a network file system (e.g. NFS). Besides access to his/her own mapset, each user can also read map layers in other users' mapsets, but s/he can modify or remove only the map layers in his/her own mapset.

When creating a new location, GRASS automatically creates a special mapset called PERMANENT where the core data for the project can be stored. Data in the PERMANENT mapset can only be added, modified or removed by the owner of the PERMANENT mapset, however, they can be accessed, analyzed, and copied into their own mapset by the other users. The PERMANENT mapset is useful for providing general spatial data (e.g. an elevation model), accessible but write-protected to all users who are working in the same location as the database owner. To manipulate or add data to PERMANENT, the owner would start GRASS and choose the relevant location and the PERMANENT mapset. This mapset also contains the DEFAULT_WIND file, which holds the default region boundary coordinate values for the location (which all users will inherit when they start using the database). Additionally, a WIND file is kept in all mapsets for storing the current boundary coordinate values and the currently selected raster resolution. Users have the option of switching back to the default region at any time.

1 Creating a GRASS database

Figure 1: GRASS 6 startup screen
\includegraphics[width=0.75\textwidth]{finalpix/grass6_startup.eps}

To create a new GRASS database, search for directory where you have write access. The disk partition should provide enough free diskspace to hold your spatial data. Create a subdirectory which represents the GRASS database (e.g., mkdir /data/grassdata/ or mkdir /home/yourlogin/grassdata/). This path has to be inserted in the ``Database'' line of the startup screen (see figure 1).

2 Installing the sample Spearfish data set

There are a couple of sample GRASS locations available for download. In our workshop we are using the Spearfish sample dataset which must be extracted in the new database directory. Then the dataset is ready to use. Before doing so, we'll have a quick look at the general structure of the program.


© 2005, GDF Hannover bR - Solutions for spatial data analysis and remote sensing