[GRASS-user] raster analysis: how to get summarized values of> two rasters

Michael Barton michael.barton at asu.edu
Tue May 20 12:25:43 EDT 2008


I'm not exactly sure what you want to do.

If you want a new map in which each cell is the sum of the values in the 2
original maps (DEM and buildings), you just add them in the map calculator

R.mapcalc newmap=DEM+buildings

If you want a map that is colored to reflect varying combinations of DEM and
buildings, use d.his with buildings for the I (intensity) and DEM for the H
(hue) entries. 

d.his h_map=buildings i_map=DEM.

Raster maps can have only 1 cat and 1 label, so you can't have a raster that
has multiple fields like a vector map can.

Michael


On 5/20/08 9:00 AM, "grass-user-request at lists.osgeo.org"
<grass-user-request at lists.osgeo.org> wrote:

> Date: Tue, 20 May 2008 08:08:22 +0000
> From: christian Brandt <chrisbrandt74 at hotmail.com>
> Subject: [GRASS-user] raster analysis: hot to get summarized values of
> two rasters
> To: <grass-user at lists.osgeo.org>
> Message-ID: <BAY102-W2393D86769B026650E9AB1A0C40 at phx.gbl>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> 
> Dear list,
> 
> I have two rasters with elevation data (DEM and buildings, both floating
> point) which I would like to overlay so that the resulting raster obtains the
> summarized z-values of both rasters.
> So I tried the r.patch and the r.mapcalculator with the result of just
> <physically> overlaid layers. E.g. at one cell where the DEM holds the z-value
> 435.0 m and the building raster the z-value 10.1 there still remain the 435.1
> m in the resulting raster.
> In case of r.mapcalculator, I used the Layer A + Layer B option.
> 
> How can I get the summarized values of both raster layers?
> 
> Regards
> 
> Christian

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton




More information about the grass-user mailing list