r.in.ascii.1grass

Langue: en

Version: 332605 (ubuntu - 24/10/10)

Section: 1 (Commandes utilisateur)

NAME

r.in.ascii - Converts ASCII raster file to binary raster map layer.

KEYWORDS

raster, import, conversion

SYNOPSIS

r.in.ascii
r.in.ascii help
r.in.ascii [-ifds] [input=name] output=name [title="phrase"] [mult=float] [nv=string] [--overwrite] [--verbose] [--quiet]

Flags:

-i

Integer values are imported
-f

Floating point values are imported
-d

Double floating point values are imported
-s

SURFER (Golden Software) ASCII file will be imported
--overwrite

Allow output files to overwrite existing files
--verbose

Verbose module output
--quiet

Quiet module output

Parameters:

input=name

ASCII raster file to be imported. If not given reads from standard input
output=name

Name for output raster map
title=phrase

Title for resultant raster map
mult=float

Multiplier for ASCII data
Default: 1.0 or read from header
nv=string

String representing NULL value data cell
Default: * or read from header

DESCRIPTION

r.in.ascii allows a user to create a (binary) GRASS raster map layer from an ASCII raster input file with (optional) TITLE.

The GRASS ASCII input file has a header section which describes the location and size of the data, followed by the data itself.

The header has 6 lines:
north: xxxxxx.xx
south: xxxxxx.xx
east: xxxxxx.xx
west: xxxxxx.xx
rows: r
cols: c
The north, south, east, and west field values entered are the coordinates of the edges of the geographic region. The rows and cols field values entered describe the dimensions of the matrix of data to follow. The data which follows is r rows of c integers.

Optionally the following parameters can be defined in the header section:
null: nn
type: float
multiplier: 2.

"null" defines a string or number to be converted to NULL value (no data).
"type" defines the data type (int, float double) and is not required.
"multiplier" is an optional parameter to multiply each cell value.

NOTES

The geographic coordinates north, south, east, and west describe the outer edges of the geographic region. They run along the edges of the cells at the edge of the geographic region and not through the center of the cells at the edges. The NW value occurs at the beginning of the first line of data, and the SW value occurs at the beginning of the last line of data.

The data (which follows the header section) must contain r x c values, but it is not necessary that all the data for a row be on one line. A row may be split over many lines.

r.in.ascii may import integer, floating point, or double cell types using the -i, -f, and -d flags, respectively.

The header information in ESRI Raster ASCII files differs from GRASS. To convert an Arc/Info (ArcView) ASCII grid file into GRASS, see r.in.arc.

SURFER (Golden Software) ASCII files may be imported by passing the -s flag.

EXAMPLE

The following is a sample input file to r.in.ascii:
north: 4299000.00
south: 4247000.00
east: 528000.00
west: 500000.00
rows: 10
cols: 15
null: -9999

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

SEE ALSO

r.out.ascii, r.in.arc, r.in.gdal, r.out.arc, r.in.bin, r3.in.ascii, GRASS ASCII formats

AUTHOR

Michael Shapiro, U.S. Army Construction Engineering Research Laboratory
Surfer support by Roger Miller

Last changed: $Date: 2009-02-04 02:43:30 +0100 (mer, 04 feb 2009) $

Full index

© 2003-2010 GRASS Development Team