transfer vector stream to raster stream
Greg Thacker
thacker at vinny.cecer.army.mil
Thu Jun 17 14:30:20 EDT 1993
John,
If you can change the dig_att directory and dig_cats if you have one
by using unix commands or an awk script. This is an example of how
we change the attribute codes as we bring them in at USACERL TAC.
1) Write a simple awk script using vi. call it any thing you want.
It will look like this:
{print $1, $2, $3, 1}
This prints out fields 1, 2, and 3 without
changing them. The fourth field is now a 1 or what ever attribute
code you wish to assign to the file you are extracting.
(For my purposes I made seven of these files and called them
tig.1 tig.2 and so on. )
2) Extract only those files you wish to assign to that attribute code.
For example, you may want to extract the A0 files first and then run the
awk script command, explained in step 3.
3) From the command line you will want to give a command like this:
awk -f tig.1 input.filename > temp
this runs your awk script using the dig_att file and directs
it to a new file called temp.
4) Remove the old dig_att file and move the temp file into a new file
with the same name as the old dig_att file. For example:
rm roads.columbia
mv temp roads.columbia
Since you have extracted all the data you may only want to change field 4 ($4)
by using the awk script command above.
Hope this helps.
Greg Thacker
USACERL TAC
thacker at vinny.cecer.army.mil
More information about the grass-user
mailing list