r3.in.xyz(1grass)
r3.in.xyz π
okay bestie, welcome to the GRASS User's Manual entry for r3.in.xyz(1grass) β she's a 3D raster builder and she EATS point clouds for breakfast. Strap in π
β¨ NAME β¨
r3.in.xyz β bestie, this makes a 3D raster map out of an assemblage of many coordinates using univariate statistics. literally turns your messy pile of points into voxels. iconic behavior tbh π¦
π KEYWORDS π
raster3d, import, voxel, LIDAR, statistics, conversion, aggregation, binning
(iykyk β she's the LIDAR girlie πΈ)
π SYNOPSIS π
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]
π© Flags
-sβ Scan data file for extent then exit. no cap, she just peeks and dips π-gβ In scan mode, print using shell script style-iβ Ignore broken lines. messy input? we simply do not perceive it π--overwriteβ Allow output files to overwrite existing files--helpβ Print usage summary--verboseβ Verbose module output--quietβ Quiet module output--uiβ Force launching GUI dialog
ποΈ Parameters
input=name[required] β ASCII file containing input dataoutput=name[required] β Name for output raster mapmethod=stringβ Statistic to use for raster values- Options:
n,min,max,range,sum,mean,stddev,variance,coeff_var,median,percentile,skewness,trimmean - Default:
mean
- Options:
type=stringβ Storage type for resultant raster map- Options:
float,double - Default:
float
- Options:
separator=characterβ Field separator- Special characters:
pipe,comma,space,tab,newline - Default:
pipe
- Special characters:
x=integerβ Column number of x coordinates in input file (first column is 1)- Default:
1
- Default:
y=integerβ Column number of y coordinates in input file- Default:
2
- Default:
z=integerβ Column number of z coordinates in input file- Default:
3
- Default:
value_column=integerβ Column number of data values in input file- If not given or set to
0, the data points' z-values are used - Default:
0
- If not given or set to
vrange=min,maxβ Filter range for value column data (min,max)vscale=floatβ Scaling factor to apply to value column data- Default:
1.0
- Default:
percent=integerβ Percent of map to keep in memory- Options:
1-100 - Default:
100
- Options:
pth=integerβ pth percentile of the values- Options:
1-100
- Options:
trim=floatβ Discard <trim> percent of the smallest and <trim> percent of the largest observations- Options:
0-50
- Options:
workers=integerβ Number of parallel processes to launch- Options:
1-256 - Default:
1
- Options:
π DESCRIPTION π
okay so here's the tea β r3.in.xyz imports sparse XYZ data from an ASCII file into a 3D raster map (aka voxels). the way she does it?? she runs the r.in.xyz module multiple times for different z-ranges and then assembles the slices with r.to.rast3. queen of delegation, honestly π
if you want the general parameter usage and tips, go read the r.in.xyz help page β she's the blueprint, fr fr.
the map gets created using the rows</>, columns</>, and depths</> set by current region settings. so bestie, PLEASE check and adjust those with the g.region module before you do the import. do not skip this step, I am begging π
you've got two vibes to choose from:
- 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.
that alternate data column can be both filtered by range and have a scaling factor applied to it. versatility?? she has it π
π NOTES π
- the 2D and 3D horizontal region resolutions must match. no wiggle room. see the EXAMPLES section below π
- unlike
r.in.xyz, reading from stdin and z-scaling are not possible. filtering by z-range gets accomplished by setting the 3D region instead. - to enable parallel processing support, set the
workers=option to match the number of CPUs or CPU-cores available on your system. alternatively, theWORKERSenvironment variable can be set to the number of concurrent processes desired. girl loves multitasking π - 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. edge cases stay winning β¨
- the script is expected to be nearly as efficient as if it was fully written in C. she's fast AND cute, we love that for her π
π EXAMPLE π
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 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. yeah. she does that. not our fault bestie, we just live here π
π SEE ALSO π
g.region, r.in.xyz, r.to.rast3
π AUTHOR π
Hamish Bowman Dunedin, New Zealand
π§ SOURCE CODE π§
Available at: r3.in.xyz source code (history)
Latest change: Tuesday Oct 21 09:57:14 2025 in commit: fb0165c2d021b7700528aca09c224847be871729
Main index | 3D raster index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
and that's the whole page bestie, tysm for reading π«Ά this was the r3.in.xyz(1grass) manual straight out of the GRASS 8.5.0 world β go make some voxels, you're gonna slay πβ¨π
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· 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