GRASS -- GRASS Rasters

GDAL optionally supports reading of existing GRASS raster layers (cells, and image groups), but not writing or export. The support for GRASS raster layers is determined when the library is configured, and requires libgrass to be pre-installed.

GRASS rasters can be selected in several ways.

  1. The full path to the cellhd file for the cell can be specified. This is not a relative path, or at least it must contain all the path components within the database including the database root itself. The following example opens the cell "proj_tm" within the mapset "PERMANENT" of the location "proj_tm" in the grass database located at /u/data/grassdb.

    eg.

      % gdalinfo /u/data/grassdb/proj_tm/PERMANENT/cellhd/proj_tm
    
  2. The full path to the directory containing information about an imagery group (or the REF file within it) can be specified to refer to the whole group as a single dataset. The following examples do the same thing.

    eg.

      % gdalinfo /usr2/data/grassdb/imagery/raw/group/testmff/REF
      % gdalinfo /usr2/data/grassdb/imagery/raw/group/testmff
    
  3. If there is a correct .grassrc5 setup in the users home directory then cells or imagery groups may be opened just by the cell name. This only works for cells or images in the current location and mapset as defined in the .grassrc5 file.

The following features are supported by the GDAL/GRASS link.

See Also: