## NAME

r.out.bin - exports a GRASS raster to a binary array
(GRASS Raster Export Program)

## SYNOPSIS

r.out.bin [-i] [-h] [-b] [-s] input=name output=name [null=value]

## DESCRIPTION

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.

### Flags:

-i
  Output integer category values, not raster cell values
-h
  Include a Generic Mapping Tools (GMT) binary header on the file
-b
  Generate seperate BIL world and header description files
-s
  Byte swap the data and optional header during output

### Parameters:

input
  Name of an existing raster map
output
  Name of an output binary file (use output=- for stdout)
null
  Value to write out for null
  Default: 0

## 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.

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

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

## AUTHOR

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

## SEE ALSO

r.in.bin, r.in.ascii r.out.ascii r.in.arc, r.out.arc

Last changed: $Date: 2002/03/01 00:08:31 $