r3.in.bin(1grass)
π r3.in.bin β the GRASS module page, but make it make sense π
okay bestie, sit down, hydrate, because we're importing binary raster files into GRASS 3D raster maps and honestly? it's giving main character energy. this is r3.in.bin from the GRASS User's Manual, and i'm gonna walk you through every single flag like your favorite study buddy who actually read the whole thing. π¦
β¨ NAME β¨
r3.in.bin β imports a binary raster file into a GRASS 3D raster map. that's it, that's the whole job. voxels. in. π
πΈ KEYWORDS πΈ
raster3d, import, voxel
π SYNOPSIS π
no cap, here's exactly how you call her:
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 π₯
listen, flags are the little switches that change the vibe. here's literally every one:
-rβ switches the row order in the output fromnorth->southtosouth->north. flipping the script, literally.-dβ switches the depth order in the output frombottom->toptotop->bottom. yes, also a flip. depths this time.-iβ tells it the binary data is of type integer. ok so it's not float, noted βοΈ-sβ signed data (two's complement). we love a signed queen.--overwriteβ allows output files to overwrite existing files. chaotic but valid, use with intention bestie π«Ά--helpβ prints the usage summary. when in doubt, ask for help. iconic.--verboseβ verbose module output. it will simply tell you everything.--quietβ quiet module output. the opposite vibe.--uiβ forces launching the GUI dialog. for the visual learners β¨
π§ PARAMETERS π§
now the actual arguments, one by one, no skips:
input=name[required]β name of the binary 3D raster file to be imported. yes it's required. yes you must say it.output=name[required]β name for the output 3D raster map. also required. also must be said.bytes=integer[required]β number of bytes per cell in the binary file. options are:1,2,4,8. pick one, bestie, don't guess.order=stringβ byte order in the binary file. options:big,little,native,swap. default isnative.north=float[required]β northern limit of the geographic region (outer edge).south=float[required]β southern limit of the geographic region (outer edge).east=float[required]β eastern limit of the geographic region (outer edge).west=float[required]β western limit of the geographic region (outer edge).bottom=float[required]β bottom limit of the geographic region (outer edge).top=float[required]β top limit of the 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. give your no-data cells a little identity π
π DESCRIPTION π
okay so here's the tea: r3.in.bin allows a user to create a GRASS 3D raster map from a variety of binary 3D raster data formats. variety! plural! she's flexible.
the top, bottom, north, south, east, and west field values you enter are the coordinates of the edges of the geographic region. meanwhile the depths, rows and cols field values you enter describe the dimensions of the matrix of data that's about to follow. so like, where it lives and how big it is. both matter. both. πΈ
and hmm, one thing: if the bytes field is entered incorrectly, an error will be generated suggesting a closer bytes value. it's not gonna silently let you cook β it'll gently nudge you toward the right number. π«Ά
π NOTES π
- the write order of the rows (
north->southtosouth->north) and the write order of the depths (bottom->toptotop->bottom) can be switched. your data, your order, your rules. - go have a look at the
r3.out.asciimanual page β it describes the internal layout of the 3D raster maps and the supported row and depth switch options. it's basically the lore drop you need iykyk. - import of little and big endian byte order as well as signed and unsigned integer data types is supported. all of them. she does not discriminate. π
β EXAMPLES β
first we create a specific region and a 3D raster map that we will export with r3.out.bin and import again. full circle moment, honestly.
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
and that's it. exported, imported, slayed. π₯
π¦ SEE ALSO π¦
r3.out.binr3.in.asciir3.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)
latest change: Friday Feb 07 19:16:09 2025 in commit a82a39f673b97fafcfce1604dc3e6015cb96487a
main index | 3D raster index | topics index | keywords index | graphical index | full index
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
no cap, that's the whole page. every flag, every default, every coordinate, every endian, untouched. i just made it fun. π β¨
mwah π this was r3.in.bin from the GRASS 8.5.0 Reference Manual β footer said it, not me: GRASS 8.5.0, r3.in.bin(1grass). go import something cute π
π¦ 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