[GRASS-user] integer and discrete raster

Frank David frank.david at geophom.fr
Tue Sep 25 00:35:09 PDT 2018


Hello all,

I've done a sum with r.series from 8 rasters previously calculated with 
r.mapcalc. Each raster cell content is 0 or 1. So the sum raster cells 
should have 0 to 8. I was looking at r.category to set labels like "1 to 
2", "3 to 4", etc. To see my raster values, I've done a r.describe, and 
the result surprised me :

0.000000-0.031373
0.972549-1.003922
1.976471-2.007843
2.980392-3.011765
3.984314-4.015686
4.956863-4.988235
5.960784-5.992157
6.964706-6.996078
7.968627-8.000000

instead of :

0
1-1
2-2
...
8-8

If I do int(value) with r.mapcalc in my first raster (value is integer), 
r.describe returns integer result as expected.

Why r.describe return float values ? how they are calculated ? why I 
must make a int() on a integer to get an integer ?

Since my values are integer, how can I force raster in CELL instead of 
DCELL ?

Thanks to help me to understand this !

Regards,

Frank

-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20180925/55cd39bf/attachment.html>


More information about the grass-user mailing list