Voxel

From GRASS-Wiki
Jump to: navigation, search

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.

Import or creating of volumes

From 3D point data:

You can import 3D ASCII raster data in GRASS voxel format using r3.in.ascii or r3.in.xyz (in GRASS 6 an Addon). Note:

  • 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.


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 the raster3dintro for more details.

Voxel operations

Powerful 3D map algebra is implemented in r3.mapcalc.

A 3D groundwater flow model is implement in r3.gwflow.

Cross-sections can be generated with r3.cross.rast.

Voxels can be interpolated from 3D point dat from v.vol.rst.

Voxel statistics

Volume statistics can be calculated with r3.stats and r3.univar.

Visualization

The NVIZ n-dimensional viewer supports voxel visualization. As an alternative, you can use the external Paraview application, see GRASS and Paraview:

3D groundwater flow
3D groundwater flow

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.

See also