r.in.ascii file sizes (fwd)

Alynne Bayard alynne at cast.uark.edu
Wed Mar 31 18:24:48 EST 1999


This was one of the helpful messages sent to me, but
may not  have made it to the list...alynne.

---------- Forwarded message ----------
Date: Tue, 30 Mar 1999 14:54:34 -0800
From: Leonard Coop <coopl at bcc.orst.edu>
To: grass at cecer.army.mil, alynne at cast.uark.edu
Subject: Re: r.in.ascii file sizes

Alynne,
Use the unix tools head, tail, and cat.

Suppose your file is called old.img. First use head to get the first six
lines to a new file:
head -6 old.img > new.img

So it looks like your old header:
 north: 2318 
 south: 0
 east: 1837 
 west: 0
 rows: 2319 
 cols: 1838 

Then edit the file with vi.

Next use cat to append old.img to new.img except the first 6 lines using
tail +6:
cat old.img | tail +6 >> new.img

Try it out on smaller files first to get the hang of it (no gaurantees,
I have not tried this in a while, seems like I used either 
-5 or +5 because one of them starts counting at zero).
Len

Alynne Bayard wrote:
> 
> Hello,
> 
> Does anyone know a way around editing the header of ascii files (to be
> imported
> into grass using r.in.ascii) that are over 1 gig?  VI does not work and
> I'm wondering
> if someone knows of alternative text editors that could be used....
> 
> thanks, alynne.
> 
> --
> &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
> &  Alynne Bayard (alynne at cast.uark.edu)          &
> &  Research Assistant - Tree-Ring Laboratory     &
> &  Ancient Cross Timbers Project                 &
> &  Department of Geosciences, Ozark Hall #108    &
> &  University of Arkansas                        &
> &  Fayetteville, AR 72701                        &
> &  tel:  (501) 575-4277                          &
> &  (lab) http://www.uark.edu/dendro/             &
> &  (xtimber) http://www.uark.edu/xtimber/        &
> &  {me= http://www.cast.uark.edu/~alynne}        &
> &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

-- 
Leonard Coop
Research Associate
Entomology Dept & Integrated Plant Protection Center
2046 Cordley
Oregon State University
Corvallis OR 97331-2907





More information about the grass-user mailing list