GRASS logo

NAME

r.out.xyz - Export a raster map to a text file as x,y,z values based on cell centers.

KEYWORDS

raster, export

SYNOPSIS

r.out.xyz
r.out.xyz help
r.out.xyz input=name [output=name] [fs=character] [--verbose] [--quiet]

Parameters:

input=name
Name of input raster map
output=name
Name for output file (if omitted or "-" output to stdout)
fs=character
Field separator
Default: |

DESCRIPTION

The r.out.xyz module exports a raster map as a list of x,y,z values into an ASCII text file.

NOTES

This module will not export x,y coordinates for raster cells containing a NULL value. This includes cells masked by a raster MASK.

This module, as all GRASS raster modules, will export cells based on the current region settings. See the g.region module for details.

The r.out.ascii module should be used to export an array (of size row x column) containing z values.

r.out.xyz is simply a front-end to "r.stats -1gn".

EXAMPLE

In this example, a LiDAR elevation map in the North Carolina sample dataset location is exported to CSV format.
g.region rast=elev_lid792_1m -p
r.out.xyz input=elev_lid792_1m output=elev_lid792_1m.csv fs=","

TODO

Implement this script as a r.out.ascii option?

SEE ALSO

g.region, r.mask r.out.ascii, r.stats

AUTHOR

M. Hamish Bowman
Dept. Marine Science
Otago University, New Zealand

Last changed: $Date: 2011-11-08 01:42:51 -0800 (Tue, 08 Nov 2011) $


Main index - raster index - Full index

© 2003-2013 GRASS Development Team