GRASS to ArcView

Terry Duell duell at atea.mat.army.defence.gov.au
Sun Sep 20 20:47:53 EDT 1998


Wayne Thogmartin wrote:
> 
> Anybody have any easier
> ways to import GRASS raster files into ARCVIEW?  

If the ArcView you are trying to import to understands the ArcView ascii raster file
format, then it can be relatively easy (depending on your hardware-operating
system).
The ArcView ascii raster file format is *exactly* the same as the output from
r.out.ascii except for the header, and this can be put in manually using a text
editor if necessary (we had quite a lot of files to transfer and wrote a standalone
fortran program to read the r.out.ascii and write the ArcView format) but this is
where the OS etc comes in...if you have large files you might not get the editor to
handle them.
---------------------------
The ASCII raster file format is a simple format that can be used to
transfer raster data between various applications. It is basically a few
lines of header data followed by lists of cell values. The header data
includes the following keywords and values:

 ncols - number of columns in the data set.
 nrows - number of rows in the data set.
 xllcenter or xllcorner - x-coordinate of the center or lower-left corner
of the lower-left cell.
 yllcenter or yllcorner - y-coordinate of the center or lower-left corner
of the lower-left cell.
 cellsize - cell size for the data set.
 nodata_value - value in the file assigned to cells whose value is unknown.
This keyword and value is optional. The nodata_value defaults to -9999.

For example,

ncols 480
nrows 450
xllcorner 378923
yllcorner 4072345
cellsize 30
nodata_value -32768
43 3 45 7 3 56 2 5 23 65 34 6 32 etc
35 45 65 34 2 6 78 4 38 44 89 3 2 7 etc
etc

The first row of data is at the top of the data set, moving from left to
right. Cell values should be delimited by spaces. No carriage returns are
necessary at the end of each row in the data set. The number of columns in
the header is used to determine when a new row begins. The number of cell
values must be equal to the number of rows times the number of columns.
The ASCII raster file format can only be imported or exported using the
Spatial or 3D Analysts.
-------------------------------
Hope this helps,

-- 
Terry Duell, Senior Mobility Engineer
Army Technology & Engineering Agency                   
Maribyrnong, Victoria, Australia
ph:61-3-93195837 fax:61-3-93195830



More information about the grass-user mailing list