[GRASS-dev] CELL/FCELL/DCELL [was: Re: r.mapcal rand() strangeness]

Maciej Sieczka tutey at o2.pl
Sat Mar 1 17:18:15 EST 2008


Glynn Clements pisze:
> Maciej Sieczka wrote:

>> I was going to add this information, but I'm not sure if I understand 
>> correctly that GRID3D is always floating point. Raster intro seems to 
>> suggest so, but r3.mapcalc suggests the opposite, eg.: "Note: If you 
>> calculate with integer numbers, the resulting map will be integer". 
>> Please tell me.

> I suspect that's probably an artifact of verbatim copying from the
> r.mapcalc documentation.
> 
> I'm fairly sure that G3D only supports FP.

Can you confirm if double precision only? I guess so by experiments with 
r3.mapcalc - eg.:

$ r3.mapcalc 'map=float(1)'
$ r3.info map -t
datatype="double"

> Looking at the r3.mapcalc code, the only way that you can get CELL
 > values from a 3D grid is if you use the various # operators to perform
 > colour lookups.

It still yields double for me:

$ r3.mapcalc 'map_g=g#map'
$ r3.info map_g -t
datatype="double"

?



Can anybody please say what is the official name for GRASS 3d raster 
data, which should be used in the raster intro? So far I have found the 
following:

$ cd /usr/local/grass-6.3.svn/docs/html$

$ grep -r -i "3d raster" . | wc -l
89
$ grep -r -i voxel . | wc -l
50
$grep -r -i g3d . | wc -l
46
$ grep -r -i GRID3D . | wc -l
17
$ grep -r -i "3d cell" . | wc -l
6

"3d cell" (which r3.info uses in it's output too BTW) seems kindoff 
strange - 3d rasters are supposed to be only FP data type, whereas in 2D 
raster GRASS lingo "CELL" designates the integer data type.

Maciek


More information about the grass-dev mailing list