raster3dintro(1)
๐ 3D raster data in GRASS GIS ๐
okay bestie, sit down, hydrate, because we're about to talk about 3D raster data in GRASS GIS โ that's raster3dintro from the GRASS GIS User's Manual, and it's honestly giving main character energy. ๐ฆ
๐ 3D raster maps in general โจ
GRASS GIS is literally one of the few GIS software packages out here with 3D raster data support. not like, "we have a plugin," no โ actual support. ๐ซถ
Data is stored as a 3D raster with 3D cells of a given volume. 3D rasters are designed to support representations of trivariate continuous fields. the vertical dimension supports spatial and temporal units, so space time 3D raster with different temporal resolutions can be created and processed. it's giving multidimensional slay. ๐
GRASS GIS 3D raster maps use the same coordinate system as 2D raster maps (row count from north to south) with an additional z dimension (depth) counting from bottom to top. the upper left corner (NW) is the origin. ๐งญ
3D rasters are stored using a tile cache based approach, which is the icon behavior that allows arbitrary read and write operations in the created 3D raster. the size of the tiles can be specified at import time with a given import module such as r3.in.ascii, or the data can be retiled using r3.retile after import or creation. no cap. ๐ฅ
๐ธ The 3D raster map coordinate system and the internal tile layout of the RASTER3D library
๐ Terminology and naming ๐ธ
In GRASS GIS terminology, continuous 3D data represented by regular grid or lattice is called a 3D raster map. a 3D raster map works in 3D in the same way as a (2D) raster map works in 2D, so it's called the same except for the additional 3D. periodt.
Some literature or other software may use terms such as 3D grid, 3D lattice, 3D matrix, 3D array, volume, voxel, voxel model, or voxel cube. but heads up: terms volume and volumetric often refer to measuring volume (amount) of some substance, which may or may not be related to 3D rasters. ๐
Also note: GRASS GIS uses the term 3D raster map or just 3D raster for short, rather than 3D raster layer, because the term map emphasizes the mapping of positions to values โ which is literally the whole purpose of a 3D raster map (in mathematics, map or mapping is close to the term function). on the other hand, the term layer emphasizes overlaying or stacking up. the former is not the only operation done with data, and the latter could be confusing in the case of 3D raster data. ๐ง โจ
A 3D raster map is divided into cells in the same way as the (2D) raster map. a cell is a cube or a (rectangular) cuboid depending on the resolution, and the resolution influences the volume of one cell. some literature or other software may use terms such as volume, volume unit, volumetric pixel, volume pixel, or voxel. note that voxel can sometimes be used to refer to a whole 3D raster, and that for example in 3D computer graphics, voxel can denote an object with some complicated shape. ๐
The type of map and element name in GRASS GIS is called raster_3d. the module family prefix is r3. occasionally, 3D raster related things can be referred differently, for example according to a programming language's standards โ this might be the case of some functions or classes in Python. ๐
In GRASS GIS, 3D rasters are stored in tiles, which are hidden from the user most of the time. when analyzing or visualizing 3D rasters, the user can create slices or cross sections. slices can be horizontal, vertical, or general plains going through a 3D raster. slices, especially the horizontal ones, may be called layers in some literature or some other software. cross sections are general functions, e.g. defined by 2D raster, going through a 3D raster. another often used term is an isosurface, which has the same relation to a 3D raster as a contour (isoline) has to a 2D raster. an isosurface is a surface that represents places with a constant value. ๐
When 3D raster is used in the way that the vertical dimension represents time, the 3D raster can be referred to as space time cubes (STC) or space time cube 3D raster. some literature may also use space time voxel cube, space time voxel model, or some other combination. we love a flexible queen. ๐
๐ฆ 3D raster import ๐
๐ Import from external files
The modules r3.in.ascii and r3.in.bin support generic x,y,z ASCII and binary array import. ๐
In case of CSV tables, the module v.in.ascii (using the -z flag) may be a choice to first import the 3D points as vector points and then convert them to 3D raster (see below). ๐
Import of 3D (LiDAR) points and their statistics can be done using r3.in.lidar for LiDAR data and r3.in.xyz for CSV and other ASCII text formats. ๐ฒ
๐ Conversion from 3D vector points
3D rasters can be generated from 3D point vector data using v.to.rast3. always the full map is imported. no partial girlbossing here. ๐ฏ
๐ฆ Conversion from 2D raster maps
A 3D raster can also be created based on 2D elevation map(s) and value raster map(s) with r.to.rast3elev. alternatively, a 3D raster can be composed of several 2D raster maps (a stack of maps). in that case, 2D rasters are considered as slices and merged into one 3D raster map with r.to.rast3. stacking, but make it 3D. ๐ฅ
๐บ๏ธ 3D region settings and 3D MASK ๐
GRASS GIS 3D raster map processing is always performed in the current 3D region settings (see g.region, -p3 flags), i.e. the current region extent, vertical extent and current 3D resolution are used. ๐
If the 3D resolution differs from that of the input raster map(s), on-the-fly resampling is performed (nearest neighbor resampling). if this is not desired, the input map(s) has/have to be reinterpolated beforehand with one of the dedicated modules. Masks can be set with r3.mask. ๐ญ
๐งฎ 3D raster analyses and operations ๐ฅ
Powerful 3D raster map algebra is implemented in r3.mapcalc. a 3D groundwater flow model is implemented in r3.gwflow. math but make it slay. โโจ
๐ 3D raster conversion to vector or 2D raster maps ๐ธ
Slices from a 3D raster map can be converted to a 2D raster map with r3.to.rast. a cross sectional 2D raster map can be extracted from a 3D raster map based on a 2D elevation map with r3.cross.rast. ๐ช
๐ 3D raster statistics ๐
3D raster statistics can be calculated with r3.stats and r3.univar. numbers, but cute. ๐
๐ง 3D raster interpolation โญ
From 3D vector points, GRASS 3D raster maps can be interpolated with v.vol.rst. results are 3D raster maps, however 2D raster maps can be also extracted. โจ
๐ค 3D raster export ๐
The modules r3.out.ascii and r3.out.bin support the export of 3D raster maps as ASCII or binary files. the output of these modules can be imported with the corresponding import modules noted above. ๐
NetCDF export of 3D raster maps can be performed using the module r3.out.netcdf. it supports 3D raster maps with spatial dimensions and temporal (vertical) dimension. ๐
๐ผ๏ธ Working with 3D visualization software ๐
GRASS GIS can be used for visualization of 3D rasters, however it also has tools to easily export the data into other visualization packages. ๐ซถ
GRASS GIS 3D raster maps can be exported to VTK using r3.out.vtk. VTK files can be visualized with the VTK Toolkit, Paraview and MayaVi. moreover, GRASS GIS 2D raster maps can be exported to VTK with r.out.vtk, and GRASS GIS vector maps can be exported to VTK with v.out.vtk. ๐จ
Alternatively, GRASS 3D raster maps can be imported and exported from/to Vis5D with r3.in.v5d and r3.out.v5d. ๐
๐ข 3D raster data types ๐
3D raster's single-precision data type is most often called "FCELL" or "float", and the double-precision one "DCELL" or "double". two types, both iconic. ๐
๐ See also
- Introduction into raster data processing
- Introduction into vector data processing
- Introduction into image processing
- Introduction into temporal data processing
- Projections and spatial transformations
- Graphical User Interface
- wxGUI 3D View Mode
m.nviz.image
๐ป SOURCE CODE
Available at: 3D raster data in GRASS GIS source code (history) ๐
Accessed: Friday Nov 21 14:02:57 2025 ๐
Main index | 3D raster index | Topics index | Keywords index | Graphical index | Full index ๐
ยฉ 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual ๐ซถ
and that's the whole vibe bestie ๐ โจ we did it โ every option, every module, every term, all of it. this page was brought to you by GRASS 8.4.2, accessed Friday Nov 21 14:02:57 2025, and it's lowkey iconic. go make some 3D rasters. ๐๐ฆ๐
๐ฆ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms