[GRASS5] Bug? In d.his

Michael Barton michael.barton at asu.edu
Sun Mar 19 16:48:22 EST 2006


I discovered this when I tried to drape an orthophotoquad over a DEM for a
class presentation. There were a series of clear areas. When I displayed it
with d.rast, they were black. I queried them and they had values of 0, not
NULL. 

I ran r.nulls anyway, just to be sure, reassigning any NULLs back to 0 for
the orthophoto, making sure that it created a NULL bitmap. D.his still shows
areas with a value of 0 as clear, while d.rast does not.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402

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



> From: Glynn Clements <glynn at gclements.plus.com>
> Date: Sun, 19 Mar 2006 20:50:42 +0000
> To: Michael Barton <michael.barton at asu.edu>
> Cc: grass developers list <grass5 at grass.itc.it>
> Subject: Re: [GRASS5] Bug? In d.his
> 
> 
> Michael Barton wrote:
> 
>> I¹ve just discovered that when the ­n flag is set in d.his, it seems to
>> treat 0¹s as NULL, regardless of whether or not they have been defined as
>> NULL (i.e., using r.nulls). I¹m guessing that this is a holdover from much
>> earlier versions of GRASS that lacked NULL support. If this is the case, it
>> should probably be changed so that d.his actually respects true NULL values
>> and treats 0¹s as real values.
> 
> If it does, that's a bug, not an oversight. Both d.his and the D_*
> functions it uses go to some lengths to handle null values correctly.
> 
> Can you provide a recipe to reproduce this?
> 
> Note that:
> 
> 1. d.his doesn't care about the actual cell values for non-null cells,
> only their associated colours (for the intensity and saturation maps,
> only the red level is used; it's assumed that these maps will have
> grey-scale colour tables).
> 
> 2. A cell should be transparent if that cell is null in any of the
> input maps.
> 
> -- 
> Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list