r.out.bin.1grass man page

r.out.bin — Exports a GRASS raster to a binary array.


raster, export


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


Generate integer output
Generate floating-point output
Export array with GMT compatible header
Generate BIL world and header files
Byte swap output
Print usage summary
Verbose module output
Quiet module output
Force launching GUI dialog


input=string [required]
Name of input raster map
Name for output binary map (use output=- for stdout)
Value to write out for null
Default: 0
Number of bytes per cell
Options: 1, 2, 4, 8
Output byte order
Options: big, little, native, swap
Default: native


The r.out.bin program exports a GRASS raster map to a binary array file. Optionally, output can be sent to standard output (stdout) for direct input (pipe) into other applications. 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.


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.

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.

See Also

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


This program is derived from r.out.ascii with a few modifications.
Author: Bob Covill

Last changed: $Date: 2014-11-01 20:59:34 +0100 (Sat, 01 Nov 2014) $

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

© 2003-2016 GRASS Development Team, GRASS GIS 7.0.4 Reference Manual


GRASS 7.0.4 Grass User's Manual