raster3dintro(1grass)

๐ŸŒˆ raster3dintro(1grass) โ€” 3D raster data in GRASS ๐Ÿ’…

okay bestie, welcome to raster3dintro, from the GRASS User's Manual โ€” this is the intro page for 3D raster data in GRASS and fr fr it's a whole vibe. It's not a command you run, it's the lore you read before you run the commands. Let's get into it. ๐Ÿฆ‹


๐Ÿ—บ๏ธ 3D raster data in GRASS

โœจ 3D raster maps in general

GRASS is one of the few GIS software packages that has 3D raster data support. Periodt. ๐Ÿ’… Data are 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 โ€” hence space time 3D raster with different temporal resolutions can be created and processed. Literally iconic.

GRASS 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. This 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. ๐Ÿซถ

๐Ÿ“ธ (figure: The 3D raster map coordinate system and the internal tile layout of the RASTER3D library)

๐ŸŒธ Terminology and naming

In GRASS 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. 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. Heads up though: the terms volume and volumetric often refer to measuring volume (amount) of some substance, which may or may not be related to 3D rasters. ๐Ÿ“

Note that GRASS 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 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. iykyk. ๐Ÿ’œ

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. 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. ๐Ÿ˜ญ

Type of map and element name in GRASS is called raster_3d. The module family prefix is r3.. Occasionally, 3D raster related things can be referred to differently, for example according to programming language standards. This might be the case for some functions or classes in Python. ๐Ÿ

In GRASS, 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 a 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 a 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. Obsessed. ๐ŸŽ€


๐Ÿ“ฅ 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. Slay.

In the 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 (v.to.rast3). Always the full map is imported. No crumbs left, bestie.

๐ŸŒˆ Conversion from 2D raster maps

A 3D raster can also be created based on 2D elevation map(s) and value raster map(s) (r.to.rast3elev). Alternatively, a 3D raster can be composed of several 2D raster maps (stack of maps). The 2D rasters are considered as slices in this case and merged into one 3D raster map (r.to.rast3). Stacking? We love a stack. ๐Ÿฅž


๐Ÿ“ 3D region settings and 3D mask

GRASS 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 (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. Main character energy, honestly. ๐ŸŒŠ


๐Ÿ”ƒ 3D raster conversion to vector or 2D raster maps

Slices from a 3D raster map can be converted to a 2D raster map (r3.to.rast). A cross sectional 2D raster map can be extracted from a 3D raster map based on a 2D elevation map (r3.cross.rast). ๐Ÿฆ‹


๐Ÿ“Š 3D raster statistics

3D raster statistics can be calculated with r3.stats and r3.univar. Numbers bestie, get your numbers. ๐Ÿ”ข


๐Ÿงต 3D raster interpolation

From 3D vector points, GRASS 3D raster maps can be interpolated (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. Round trip, periodt. ๐ŸŽ€

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 can be used for visualization of 3D rasters, however it also has tools to easily export the data into other visualization packages.

GRASS 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 2D raster maps can be exported to VTK with r.out.vtk and GRASS vector maps can be exported to VTK with v.out.vtk. ๐Ÿ‘‘

Alternatively, GRASS 3D raster maps can be imported and exported from/to Vis5D (r3.in.v5d, 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". That's the tea. โ˜•


๐Ÿ‘€ 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
  • wxGUI 3D View Mode
  • m.nviz.image

๐Ÿ’พ SOURCE CODE

Available at: 3D raster data in GRASS source code (history)

Accessed: Friday May 08 10:38:23 2026

Main index | 3D raster index | Topics index | Keywords index | Graphical index | Full index

ยฉ 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual


okay that's the whole page bestie, you ate it ๐Ÿซถ go make some 3D rasters. ๐Ÿ’–

sign-off: this was the GRASS 8.5.0 Reference Manual, page raster3dintro(1grass), and the last time anyone touched the source it was Friday May 08 10:38:23 2026 โ€” mwah, iconic, no cap. โœจ๐ŸŽ€๐Ÿฆ‹
๐Ÿ“ฆ where this page comes from