header files

Malcolm Williamson malcolm at cast.uark.edu
Tue Aug 23 12:55:43 EDT 1994


> 
> I have a small data set that I want to manipulate in GRASS.  The problem 
> is the header file.  Creation of this file requires that I specify the 
> number of rows, columns, and bytes per cell.  As you know the product of 
> these 3 values must equal the file size.  My file is 125124 mb.  I have 
> 400 columns and 107 rows.  Dividing the file's size by the product of 
> columns and rows indicates I have 2.9 bytes per cell.  This isn't 
> acceptable of course.  I believe my problem lies in the presentation of 
> the data.  I used a spreadsheet (Microsoft's Excel) to enter the data and 
> saved it as a text file.  This program is limited to 256 columns so I 
> wrapped the columns down to the next line, starting a new line at each 
> new row.  Is this my problem?  If so does anyone have a suggestion as to 
> how I might create a text file without this problem?  Your help is 
> appreciated.
> 
> 
> 
> Brad Robbins						Dept. of Biology
> brobbins at chuma.cas.usf.edu				Univ. of South Florida
> 
Assuming that you are generating your text file on a DOS machine, have you
tried running your file through the dos2unix filter on your Unix box? You
probably have DOS carriage returns (^M) that need to be deleted, which dos2unix
does. r.in.ascii does not care if all of your columns are located on one row
of text; it simply looks at you header and reads the data by 400 words per
row, assuming that you specified 400 columns.

Good luck!
-- 
Malcolm D. Williamson - GIS Specialist           E-mail: malcolm at cast.uark.edu
Center for Advanced Spatial Technologies      Telephone: (501) 575-6159
Ozark Rm. 12                                        Fax: (501) 575-3846 
University of Arkansas              
Fayetteville, AR 72701



More information about the grass-user mailing list