[GRASSLIST:7953] Re: [GRASS5] 3D Rasters in current CVS

Markus Neteler neteler at itc.it
Wed Aug 17 15:08:18 EDT 2005

Hi Benjamin,

as Helena suggests, there will be an issue with your WIND file
which now contains the 3D info.

I made a quick funny test in spearfish60, works well:

#Set 3D region:
g.region res3=100 b=800 t=1600 -p3 

#generate a volume:
r3.mapcalc "vol1=sin(x())+cos(y())+sin(z())"

#fetch range (average around zero):
r3.info -r vol1

# visualize
nviz elevation.dem vol=vol1

#-> go Panel -> Volumes -> Add -> New Constant -> 0 [return] -> Accept
# Now wait some seconds to get the colume rendered

Looks nice...


On Wed, Aug 17, 2005 at 06:33:50PM +0200, Benjamin Ducke wrote:
> r3.mapcalc seems broken in current CVS (?). Even the most simple
> operation like
> result = input * 10
> gives this error:
> FATAl ERROR: G3d_getDoubleRegion: error in G3d_getTilePtr
> NVIZ is giving me some trouble, too. I don't understand what
> information NVIZ uses to position a 3D raster map in space.
> I have tried loading in a plain surface with height range 4 to 9
> meters and a 3D raster with Z boundaries set to the same values.
> However, the latter is being positioned well below the surface
> (the data range of the 3D raster is about 1.0 to 3.0).
> The X/Y positioning seems correct.
> I can change the Z position manually but am still unable to display anything
> using the "slices" method. ISO-surface extraction seems to work.
> Any ideas, why this is so?
> I would really like to use voxels/3D rasters in GRASS and volunteer to write
> a tutorial on it, but I feel currently very vague about some aspects of
> implementation.
> First, I would like to understand the working of r3.in.ascii a bit better:
> am I right in thinking that every raster map in the input file defines the 
> lower faces of one level of voxels and that voxels are stacked from bottom to top?
> Can 3D rasters also be integers or only fp?
> Thanks,
> Benjamin. 

Markus Neteler     <neteler itc it>       http://mpa.itc.it
ITC-irst -  Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18        -       38050 Povo (Trento), Italy

More information about the grass-user mailing list