r3.in.xyz(1grass)

r3.in.xyz1grass

Create a 3d raster map from an assemblage of many coordinates using univariate statistics

Usage

r3.in.xyz

r3.in.xyz --help

r3.in.xyz [-sgi] input=name output=name [method=string] [type=string] [separator=character] [x=integer] [y=integer] [z=integer] [value_column=integer] [vrange=min,max] [vscale=float] [percent=integer] [pth=integer] [trim=float] [workers=integer] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Keywords

raster3d, import, voxel, LIDAR, statistics, conversion, aggregation, binning

Overview

r3.in.xyz imports sparse XYZ data from an ASCII file into a 3D raster map (voxels). It does this by running the r.in.xyz module multiple times for different z-ranges and then assembling the slices with r.to.rast3.

See the r.in.xyz help page for general parameter usage and tips.

The map is created using the rows, columns, and depths set by current region settings. Be sure to check and adjust these with the g.region module before performing the import.

You may either use the z-value as the data value for the voxel (e.g. with the ’n’ statistic), or alternately scan another column for the data values to bin into the voxels. This alternate data column can be both filtered by range and have a scaling factor applied to it.

Notes

The 2D and 3D horizontal region resolutions must match. See the EXAMPLES section below.

Unlike r.in.xyz, reading from stdin and z-scaling are not possible. Filtering by z-range is accomplished by setting the 3D region.

To enable parallel processing support, set the workers= option to match the number of CPUs or CPU-cores available on your system. Alternatively, the WORKERS environment variable can be set to the number of concurrent processes desired.

Points falling exactly on a vertical bound will belong to the depth band below them, except for points exactly on the top bound, which will belong to the top-most slice.

The script is expected to be nearly as efficient as if it was fully written in C.

Examples

Using the Serpent Mound dataset. (see the GRASS LiDAR wiki page)

  #scan dataset for extent:
  r3.in.xyz -s in=Serpent_Mound_Model_LAS_Data.txt out=dummy \
     x=1 y=2 z=3 separator=space
  # set the 2D and 3D regions:
  g.region n=4323641.57 s=4320942.61 w=289020.90 e=290106.02 res=1 -a
  g.region b=166 t=216 res3=1 tbres=5 -3 -p
  r3.in.xyz in=Serpent_Mound_Model_LAS_Data.txt out=serpent3D \
     method=mean x=1 y=2 z=3 separator=space type=float

The same, but aggregate and store backscatter strength from column 5 into voxels in instead of the z-value:

  r3.in.xyz in=Serpent_Mound_Model_LAS_Data.txt out=serpent3D.bakscat \
     method=mean x=1 y=2 z=3 val=5 separator=space type=float

Known issues

r.to.rast3 always creates a double output map regardless of input.

Source code

Available at: r3.in.xyz source code (history)

Accessed: Monday Feb 24 17:51:45 2025

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

© 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual

Releases

5 releases since Debian 9 (Stretch); the text changed 4 times.

  1. 9
  2. 10
  3. 11
  4. 12
  5. 13

Author

Hamish Bowman
Dunedin, New Zealand

From grass-doc 8.4.1-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.