: # for making an area out of points piped from NVIZ tempE=`g.tempfile pid=$$` tempN=`g.tempfile pid=$$` outF="$LOCATION/dig_ascii/$$.asc" if [ $# = 0 ] then echo "USAGE: ${0} ascii_import_file [new_vect_and_rast_filename]" exit 0 fi if [ $# = 1 ] then newname=nvimport.$$ fi if [ $# = 2 ] then newname=$2 fi if [ ! -d $LOCATION/dig_ascii ] then mkdir $LOCATION/dig_ascii fi grep easting $1 | awk '{print $2}' > $tempE grep northing $1 | awk '{print $2}' > $tempN NP=`wc $tempE | awk '{print $1}'` echo "ORGANIZATION: UI Geographic Modeling Systems Lab" > $outF echo "DIGIT DATE:" `date` >> $outF echo "DIGIT NAME:" >> $outF echo "MAP NAME:" >> $outF echo "MAP DATE:" >> $outF echo "MAP SCALE: 24000" >> $outF echo "OTHER INFO:" >> $outF echo "ZONE:" `g.region -p | grep zone | awk '{print $2}'` >> $outF echo "WEST EDGE:" `g.region -p | grep west | awk '{print $2}'` >> $outF echo "EAST EDGE:" `g.region -p | grep east | awk '{print $2}'` >> $outF echo "SOUTH EDGE:" `g.region -p | grep south | awk '{print $2}'` >> $outF echo "NORTH EDGE:" `g.region -p | grep north | awk '{print $2}'` >> $outF echo "MAP THRESH: 100" >> $outF echo "VERTI:" >> $outF echo "A " $NP >> $outF paste $tempN $tempE | awk '{print " " $0}' >> $outF # close poly paste $tempN $tempE | awk '{print " " $0}' | head -1 >> $outF v.in.ascii $$.asc out=$newname v.support $newname v.alabel $newname v.to.rast $newname out=$newname /bin/rm $outF echo echo CREATED VECTOR FILE $newname echo CREATED RASTER FILE $newname echo echo $0 COMPLETE