GRASS logo

Note: A new GRASS GIS stable version has been released: GRASS GIS 7. Go directly to the new manual page here

NAME - Converts a 3D ASCII raster text file into a (binary) 3D raster map layer.


raster3d, voxel, import

SYNOPSIS help input=name output=name [nv=string] [type=string] [precision=string] [compression=string] [tiledimension=XxYxZ] [--overwrite] [--verbose] [--quiet]


Allow output files to overwrite existing files
Verbose module output
Quiet module output


ASCII raster map to be imported
Name for output raster3d map
String representing NULL value data cell (use 'none' if no such value)
Default: *
Data type used in the output file
Options: default,double,float
Default: default
Precision used in the output file (default, max, or 0 to 52)
Default: default
The compression method used in the output file
Options: default,rle,none
Default: default
The dimensions of the tiles used in the output file
Default: default

DESCRIPTION allows a user to create a (binary) GRASS 3D raster map layer from a 3D ASCII raster input file with (optional) TITLE.

Note that for compression the none option only specifies that neither LZW nor RLE is used for compression. It does not turn off the compression all together. 3D raster maps do not support non-compressed files.

The tiledimension parameter defines the dimension of the tiles used in the output file. The format is: XxYxZ

The nv parameter specifies which value to convert to NULL-value. If the specified value is none, no conversion is performed. Default is none.


The format of the 3D ASCII file:
north: floating point
south: floating point
east: floating point
west: floating point
top: floating point
bottom: floating point
rows: integer
cols: integer
levels: integer
This header is followed by the cell values in floating point format organized in rows with constant col and level coordinate. The rows are organized by constant level coordinate. Individual cell values are separated by space or CR.

NOTE: Currently, after the file has been imported, the stored values are compared with the original data. This feature is used to find bugs in the library at an early stage and will be turned off as soon as confidence has built up.


4x3x2 sample. Note, that lower-left (SW) corner of the bottom level comes first. This array format, where EW is preserved but NS is flipped, is sometimes known as "ij" coordinates. This is opposite to's format, which places the SW corner at the beginning of the last row of data.
north: 3.0
south: 0.0
east: 4.0
west: 0.0
top: 2.0
bottom: 0.0
rows: 3
cols: 4
levels: 2
w(x1,y1,z1)  w(x2,y1,z1)  w(x3,y1,z1)  w(x4,y1,z1)
w(x1,y2,z1)  w(x2,y2,z1)  w(x3,y2,z1)  w(x4,y2,z1)
w(x1,y3,z1)  w(x2,y3,z1)  w(x3,y3,z1)  w(x4,y3,z1)
w(x1,y1,z2)  w(x2,y1,z2)  w(x3,y1,z2)  w(x4,y1,z2)
w(x1,y2,z2)  w(x2,y2,z2)  w(x3,y2,z2)  w(x4,y2,z2)
w(x1,y3,z2)  w(x2,y3,z2)  w(x3,y3,z2)  w(x4,y3,z2)

Sample ASCII voxel map with one layer and several rows and columns (Spearfish area):

north: 4925010.000000
south: 4924890.000000
east: 596760.000000
west: 596610.000000
top: 1.000000
bottom: 0.000000
rows: 4
cols: 5
levels: 1
1204.74 1204.48 1204.19 1203.81 1203.39
1203.89 1203.67 1203.34 1202.98 1202.43
1203.05 1202.80 1202.51 1202.11 1201.48
1202.10 1201.92 1201.62 1201.27 1200.68


Roman Waupotitsch, Michael Shapiro, Helena Mitasova, Bill Brown, Lubos Mitas, Jaro Hofierka

SEE ALSO, r3.out.ascii,

Last changed: $Date: 2012-11-15 04:53:59 -0800 (Thu, 15 Nov 2012) $

Main index - raster3D index - Full index

© 2003-2016 GRASS Development Team