r.out.bin(1grass)

πŸ’Ύ r.out.bin β€” the GRASS User's Manual moment

okay bestie, sit down, hydrate, and let me tell you about r.out.bin πŸ’–

✨ NAME ✨

r.out.bin β€” exports a GRASS raster to a binary array. yes. literally that. it takes your raster and yeets it out as raw binary. iconic behavior honestly πŸ¦‹

🏷️ KEYWORDS 🏷️

raster, export, output


🌸 SYNOPSIS 🌸

r.out.bin
r.out.bin --help
r.out.bin [-ifhbs] input=string  [output=string]   [null=float]
[bytes=integer]   [order=string]   [--help]  [--verbose]  [--quiet]
[--ui]

πŸŽ€ Flags πŸŽ€

  • -i β€” Generate integer output. you want ints? you get ints πŸ’…
  • -f β€” Generate floating-point output. float girlies rise 🌊
  • -h β€” Export array with GMT compatible header. GMT said "let me in" and we said "okay" ✨
  • -b β€” Generate BIL world and header files
  • -s β€” Byte swap output πŸ”„
  • --help β€” Print usage summary
  • --verbose β€” Verbose module output (it will simply not stop talking, love that for us)
  • --quiet β€” Quiet module output 🀫
  • --ui β€” Force launching GUI dialog ✨

🫢 Parameters 🫢

  • input=string [required] β€” Name of input raster map. required bestie, no skipping πŸ‘‘
  • output=string β€” Name for output binary map (use output=- for stdout) πŸ“
  • null=float β€” Value to write out for null Default: 0
  • bytes=integer β€” Number of bytes per cell Options: 1, 2, 4, 8
  • order=string β€” Output byte order Options: big, little, native, swap Default: native

πŸ’œ DESCRIPTION πŸ’œ

The r.out.bin program exports a GRASS raster map to a binary array file. periodt.

bestie, you can optionally send the output to standard output (stdout) so it can be piped directly into other applications. it's giving "no middleman" energy 😌

Data is exported according to the original GRASS raster type (e.g. float). If the -i flag is specified, an integer array is output. The region parameters are printed to stderr. (stderr! not stdout! don't get it twisted πŸ™ˆ)


πŸ”₯ NOTES πŸ”₯

With the -h flag, data can be directly used by GMT as Grid Format 1 (float) or 2 (short). for example:

r.out.bin -h input=grass.raster output=new.grd
grdinfo new.grd=1 (if float)

Exported data can be piped directly into the GMT program xyz2grd. chef's kiss 🀌

r.out.bin input=grass.raster output=- | xyz2grd -R....  -ZTLf -

The example uses the GMT program xyz2grd with the -ZTLf flag indicating that a float array was output. iykyk ⭐


πŸ‘€ SEE ALSO πŸ‘€

r.in.bin, r.in.ascii, r.in.gdal, r.out.ascii


πŸ‘‘ AUTHOR πŸ‘‘

This program is derived from r.out.ascii with a few modifications.

Author: Bob Covill 🌈


🧚 SOURCE CODE 🧚

Available at: r.out.bin source code (history)

Latest change: Thursday May 08 20:58:05 2025 in commit: 4144ba81fa125e1549fc52e1cf5feb4fa004be8b

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index


ok that's the whole page bestie, every flag, every default, every line, no info lost πŸ’–

Β© 2003-2026 GRASS Development Team β€” that's the GRASS 8.5.0 Reference Manual, and this lil manpage lives at r.out.bin in GRASS 8.5.0. mwah πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from