Percent Difference

Dear GRASS users,

How can I use mapcalc to get a percent difference between two raster maps? I c
an get r.mapcalc to "not be confused" but the resulting raster map is just 1's
and 0's. Am I lost in non-floating point land? Is there a way around this?

Thanks in advance!

Use this formula in r.mapcalc

percentmap = ((raster1 - raster2)*100)/raster1

This will output a map with percent values (i.e., 50 = 50%).

Don Ebert
Research Associate
National Biological Service
Cooperative Research Unit
University of Nevada - Las Vegas

On Fri, 12 Apr 1996, Robert Tetrault wrote:

Dear GRASS users,

How can I use mapcalc to get a percent difference between two raster maps? I

can get r.mapcalc to "not be confused" but the resulting raster map is just 1'
s and 0's. Am I lost in non-floating point land? Is there a way around this?

Thanks in advance!

Hi Robert,
  Knowing your data values, you can multiply each layer by a set # before the
division in order to get the level of detail you want. Rick

On Fri, 12 Apr 1996, Robert Tetrault wrote:

How can I use mapcalc to get a percent difference between two raster maps? I

can get r.mapcalc to "not be confused" but the resulting raster map is just 1'
s and 0's. Am I lost in non-floating point land? Is there a way around this?
------------------------------------------------------------------------
Rick Thompson- Research Specialist E-mail: rick@cast.uark.edu
Center for Advanced Spatial Technologies Telephone: (501) 575-6159
Ozark Hall Rm. 12 Fax: (501) 575-5218
University of Arkansas
Fayetteville, AR 72701
DISCLAIMER: Any opinions or comments about any product, organization,
            or individual expressed in the above text are my own.