3

I am trying to understand how to use multi-channel images (e.g. landsat or the land-cover data provided by Natural Earth). I am hoping that someone can confirm or correct my interpretation of the documentation at http://grasswiki.osgeo.org/wiki/LANDSAT and perhaps elaborate somewhat on the matter.

It appears that the appropriate module for importing multi-channel (RGB or RGBA) images is r.in.gdal. I was initially confused about why r.in.gdal split images into a raster map for each channel, but now I understand that a raster data is fundamentally a single channel of information and so the split is required if the image is to be treated as raster data. It follows then that displaying the image as a layer in a map requires re-assembling the channels, which can be accomplished with a module such as d.rgb.

I am still a little puzzled at why GRASS requires the seemingly complicated process of explicitly splitting and re-assembling the RGB channels of images. Does GRASS have some method that I haven't run across that simplifies this process to the two steps required in most other GIS software: 1) import image 2) display image as layer in map.

3

see Selecting the appropriate band combination for an RGB image using Landsat imagery for an example of the usefulness of separate bands.

You can use r.composite (with many options) to combine red, green and blue raster maps into a single composite raster map (you will first need to set the region on one of the resulting rasters, red, blue or green, otherwise, nothing)

For a classic raster, You do not need any option

enter image description here

or you can write a script or a module (as r.in.rgb, in French but the code is universal)

6

GRASS GIS simply won't merge separate data without asking to preserve the data quality :-)

Rationale: If multispectral data are delivered in a multiband format, they are still separate bands even if stored in a single file.

Hint: GRASS GIS generates upon import (r.in.gdal) an imagery group to keep the imported bands logically together. Those can be fed into the image processing modules of GRASS then rather then specifying the band names individually.

Display of multispectral data: in the GUI, there is an icon to show RGB composites on the fly without extra efforts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.