next up previous
Next: Programming Interface Up: Geographic Information System Previous: GRASS and LUCAS

GRASS Structure

 

The GRASS data hierarchy is illustrated in Figure 1. The root of the GRASS file system is defined by the UNIX environment variable GISDBASE which is the path name of the GRASS database. Specifying which database to use is therefore trivial, making the parallel implementation much easier (see Section 4.2). Within the database there are many GRASS locations, which correspond to watersheds in LUCAS. A location is an independent set of data, usually associated with a distinct geographic region. Within a given location there are many mapsets. Mapsets are private repositories for maps and their supporting files. Users may write only to mapsets which they own, but they may access information in any mapsets which they have permission to read. Within each location there is a special mapset called PERMANENT which holds specific information about that location. All users must be able to access PERMANENT, therefore this is the mapset in which all of the original LUCAS maps are stored.

Each mapset contains a series of files and directories (called elements) shown in Table 1 which correspond to map components. For a particular map, each element will contain a file with the same name as that map.

  
Table 1: Table of selected GRASS mapset elements

All of the input maps used in the LUCAS simulations are raster files; discrete grids (or matrices) of numeric values each corresponding to a square parcel of land called a grid cell. In GRASS these raster maps are accessed by row. Any row may be read independently, but each row must be written sequentially because each row is usually compressed using a row-oriented compression scheme, run-length encoding (RLE) [27]. For raster maps, the cell directory is where the actual binary map is stored. Maps can be stored in an uncompressed (32-bit) format for each grid cell (pixel) or in the RLE compressed format.

The GRASS header contains such information as the map resolution, its geographic coordinates, and the number of rows and columns of grid cells contained in the map. It is assumed that all of the maps used in LUCAS will have identical headers so that the maps can be assured of being properly overlayed. If the maps do not have the same region, the map may be resampled within the correct region using the GRASS utility r.resample.

The category values are the names of the categories assigned to each numeric value found in a map. For example, in the Dungeness Watershed land cover map, the value (1) corresponds to coniferous forest; (2) corresponds to deciduous or mixed forest; (3) to grassy, brushy or new growth regions; (4) to unvegatated areas; (5) to water and (6) to snow, ice or clouds. The value of (0) is reserved to indicate that no data is present for that grid cell.

The color table of each map assigns a specific color to each category value. If these are not specified, GRASS will assign arbitrary colors automatically.

The region contains the geographic boundaries of the area being examined by GRASS as well as the sampling resolution for this area. There is one current region which must be specified (via g.region) before running LUCAS. For information on installing GRASS for use with LUCAS see Appendix B and [13].



next up previous
Next: Programming Interface Up: Geographic Information System Previous: GRASS and LUCAS



Michael W. Berry (berry@cs.utk.edu)
Wed Aug 16 10:48:40 EDT 1995