convert projection of site file
Jill Schuler
jschuler at tulip.itc.nrcs.usda.gov
Wed Jun 18 19:22:48 EDT 1997
Teresa,
This is a quick and dirty script. There is no error checking!!
The script expects the site file to be in your current mapset.
Two arguments should be entered on the command line:
proj.site infile outfile
where:
infile is the name of the site_lists file to project
outfile is the name for the new projected site file.
The output file is placed under your current directory or the "full path"
Contents of file proj.site------------------
:
file=$1
outfile=$2
OUTPARMS="+proj=aea +ellps=clark66"
INPARMS=`$GISBASE/mapgen/interface/get_proj_inf`
sed -e "s/|/TAB/g" $LOCATION/site_lists/$file |proj $INPARMS -I - >tmp.$$
cat tmp.$$|proj $OUTPARMS -|sed -e "s/TAB/|/g" >$outfile
rm tmp.$$
------------------------end
note!!! be sure to use the TAB key in the sed statement.
Additionally, you could setup OUTPARMS as an argument (OUTPARMS=$3).
Then you would enter the command as:
proj.site infile outfile "+proj=aea +ellps=clark66"
Hope this helps!
Jill
__________________________________________
____ __ ______ _____ _______ .
/ \ // / // / // // // / \
/ \ // / // / // / \
/ \ // /____// / //____/// /.....\/\ /\
/ \// / \\ / // / \_/\_/ \
_/ \/__/ \\_/_____//______ // /\/ _/\ ---------
________________________________________/
Jill R. Schuler
USDA
Natural Resource Conservation Service
2627 Redwing, Suite 120
Ft. Collins, Co 80526 FAX: (970) 282-1930
VCOMM:9010-2418
e-mail: jschuler at itc.nrcs.usda.gov Phone: (970) 282-2418
More information about the grass-user
mailing list