r3.in.bin(1)

πŸ’– r3.in.bin πŸ’–

okay bestie, so this is r3.in.bin, part of the GRASS GIS User's Manual β€” the little tool that scoops up a binary raster file and drops it into your GRASS 3D raster map. yes. voxels. we're doing voxels today. 🧚✨


✨ NAME ✨

r3.in.bin β€” Imports a binary raster file into a GRASS 3D raster map. 🫢


🏷️ KEYWORDS 🏷️

raster3d, import, voxel


πŸ“œ SYNOPSIS πŸ“œ

r3.in.bin
r3.in.bin --help
r3.in.bin [-rdis] input=name output=name bytes=integer  [order=string]
north=float south=float east=float west=float bottom=float top=float
rows=integer cols=integer depths=integer  [null=float]   [--overwrite]
[--help]  [--verbose]  [--quiet]  [--ui]

🚩 Flags 🚩

  • -r β€” flips the row order in the output, from north->south into south->north. little glow-up for your rows πŸ’…
  • -d β€” flips the depth order in the output, from bottom->top into top->bottom. yes queen, reverse it
  • -i β€” the binary data is of type integer
  • -s β€” signed data (two’s complement), no cap
  • --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] β€” Name of binary 3D raster file to be imported
  • output=name [required] β€” Name for output 3D raster map
  • bytes=integer [required] β€” Number of bytes per cell in binary file
    • Options: 1, 2, 4, 8
  • order=string β€” Byte order in binary file
    • Options: big, little, native, swap
    • Default: native
  • north=float [required] β€” Northern limit of geographic region (outer edge)
  • south=float [required] β€” Southern limit of geographic region (outer edge)
  • east=float [required] β€” Eastern limit of geographic region (outer edge)
  • west=float [required] β€” Western limit of geographic region (outer edge)
  • bottom=float [required] β€” Bottom limit of geographic region (outer edge)
  • top=float [required] β€” Top limit of geographic region (outer edge)
  • rows=integer [required] β€” Number of rows
  • cols=integer [required] β€” Number of columns
  • depths=integer [required] β€” Number of depths
  • null=float β€” Set Value to NULL

πŸ’« DESCRIPTION πŸ’«

so like, r3.in.bin lets you build a GRASS 3D raster map out of a whole variety of binary 3D raster data formats. it's giving "glow up your raw bytes". 😌

the top, bottom, north, south, east, and west field values you type in are literally the coordinates of the edges of the geographic region. and the depths, rows and cols field values describe the dimensions of the matrix of data that's about to follow.

⚠️ and listen: if you enter the bytes field wrong, an error gets generated suggesting a closer bytes value. so if it yells at you, it's helping. not me being dramatic, that's just what it does. 😭

πŸ“ NOTES πŸ“

  • the write order of the rows (north->south to south->north) and the write order of the depths (bottom->top to top->bottom) can both be switched. so flexible, so iconic. πŸ”₯
  • go peek at the r3.out.ascii manual page β€” it describes the internal layout of the 3D raster maps and the supported row and depth switch options. iykyk. πŸ‘‘
  • Import of little and big endian byte order as well as signed and unsigned integer data types is supported. we love a flexible queen. πŸ’–

🌈 EXAMPLES 🌈

first we create a specific region and a 3D raster map that we will export with r3.out.bin and import again. bestie it's a whole round trip ✈️✨

g.region w=0 e=180 s=0 n=90 b=0 t=100 res3=10
r3.mapcalc expr="test_out_bin_float = float(if(row() == 2, null(), row()))"
r3.out.bin input=test_out_bin_float byte=4 null=-9999 \
    output=test_out_bin_float_native_b4.bin order=native
r3.in.bin output=test_in_bin_float byte=4 null=-9999 \
    input=test_out_bin_float_native_b4.bin order=native \
    bottom=0 top=100 west=0 east=180 south=0 north=90 \
    cols=18 rows=9 depths=10

πŸ‘€ SEE ALSO πŸ‘€

r3.out.bin, r3.in.ascii, r3.out.ascii


πŸ’œ AUTHORS πŸ’œ

Soren Gebbert, based on r.in.bin from Jacques Bouchard and Bob Covill


πŸ”— SOURCE CODE πŸ”—

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

Accessed: Saturday Jan 17 05:41:14 2026

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


okay that's the whole page, no cap πŸ’… this manual page is from GRASS GIS 8.4.2, it's the r3.in.bin(1) page, the GRASS Development Team says Β© 2003-2025, and the reference manual is the GRASS GIS 8.4.2 Reference Manual. version GRASS 8.4.2, mwah. slay, go import some voxels πŸ¦‹πŸŽ€βœ¨

πŸ“¦ where this page comes from