3D raster map (voxel) processing in GRASS
GRASS GIS is one of the few GIS with volume data support. Here data are stored as a 3D raster with a unit volume called a voxel (volume pixel). Voxels are designed to support for example representations of trivariate continuous fields.
For an overview, see in the manual the raster3d summary page.
Import or creation of volumes
From 3D point data:
You can import 3D ASCII raster data in GRASS voxel format usingor . There are different possibilities:
- For r3.in.ascii the data need to be plain and properly ordered value data with a header (see the manual for the format).
- In case of regular 3D data (x,y,z,value) in a CSV style file, use r3.in.xyz with method "mean". This only works properly when one value falls into a target voxel.
- Import x,y,z,... data as 3D with the "-z" flag and "z=" column parameter (see below for voxel interpolation):
v.in.ascii -z format=point cat=1 x=2 y=3 z=4
- You can convert a 2D vector into a 3D vector with (take elevation values from vector attribute column) or (interpolate elevation values from a raster DEM map) - see below for voxel interpolation.
From 2D raster maps:
You can also create a volume raster model based on 2D raster data by converting 2D raster slices into 3D raster or a 3D volume map based on 2D elevation and value raster maps.
See thefor more details.
Among other functionalities, there are available:
- Powerful 3D map algebra is implemented in .
- Cross-sections can be generated with .
- Voxels can be interpolated from 3D point dat from .
- A 3D groundwater flow model is implement in .
See also thefor more details.
Volume statistics can be calculated withand .
Region settings are handled by the
-3 flag: Prints 3D settings rast3d Set region to match this 3D raster map (both 2D and 3D values) t Value for the top edge b Value for the bottom edge res3 3D grid resolution (north-south, east-west and top-bottom) tbres Top-bottom grid resolution 3D
From the mailing list: Raster 3D from DEMs (drillhole data).
Technical details of implementation
The 3D raster (voxel) implementation in GRASS GIS is using a tiled based storage approach (see related page in the Programmer's Manual). The tiles can be stored in compressed form (zlib in GRASS7) or uncompressed form on the hard disk. Usually you store them in compressed form. Hence in case you have many tiles that are empty or have equal data, the compression is very high. GRASS can handle 3D raster maps up to hundreds of GB in size. The main memory is not an issue when processing 3D raster maps, since only a limited number of tiles is read into main memory at runtime. You can specify the tile size of each 3D raster map that you create. Hence you can adjust it to the needs of , e.g. soil depths resolution.
In addition you can specify a 3D raster mask that works pretty the same way as masks in the raster approach in GRASS GIS.