negative numbers in d.rast.num

Lars Schylberg larss at
Wed Feb 10 08:27:57 EST 1993

Today I realized that d.rast.num is not printing negative numbers.
Well I fixed it. Here is the solution.  I think d.rast.num should be
so general so that it should print negative values.  Maybe a flag
could be added to turn this off.


Lars Schylberg                          Email: larss at  
Dept. of Geodesy and Photogrammetry 
Royal Institute of Technology (KTH)     Tel.   +46 8 790 86 33   
S-100 44  STOCKHOLM, SWEDEN             Fax.   +46 8 790 66 10

To enable d.rast.num to print negative categories

row 249 in file "number.c" in "d.rast.num" should be 

changed from:     if(cell[col] > 0){

to:               if(cell[col] != 0){

More information about the grass-dev mailing list