[GRASS-user] Displaying Multiple Adjacent Raster Maps

Glynn Clements glynn at gclements.plus.com
Wed Jan 13 13:32:20 EST 2010

Rich Shepard wrote:

>    What I expected to be simple is eluding me.
>    Using r.in.gdal I've imported 10m DEM maps for the NE, SE, and SW
> quadrants of Oregon to augment the already imported NW quadrant. Now,
> however, I'm having difficulties displaying all four simultaneously to make
> sure they edge match and cover the entire state. This happens with both the
> GUI and the command line.
>    I can display only one at a time. It must be a WIND/region issue that I've
> not correctly defined, and I don't see what I've missed.
>    The rows, columns, and total cells for each map are:
>    Quadrant     Rows    Columns         Cells
>      NW         18724   24657           461677668
>      NE         18856   24779           467232824
>      SE         18680   24650           460462000
>      SW         18732   24662           461968584
>    Using the highest pair of rows (37588) and highest pair of columns (49441)
> I set g.region with those totals. The PROJ_UNITS are in feet so I also set
> ewres and nsres to 3.048, but one setting overrides the other, so I elected
> to go with the rows/columns.
>    d.rast draws very slowly, and as soon as I repeat the command with a
> different map the first is erased and replaced.
>    What is the proper approach to defining a region to accommodate 4 DEM
> quadrants?

	g.region rast=rast1,rast2,...

will set the current region to the minimum rectangle containing all of
the rasters.

For display, you should probably set res= to a larger value to speed
things up. There's no point in reading the rasters at a resolution far
higher than can be displayed.

> How do I display them all simultaneously on the monitor?

	d.rast -o ...

makes null cells (including those outside of the raster) transparent. 
In 7.0, this is the default behaviour (the -n flag makes null cells

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-user mailing list