[GRASS5] The status of 5.0
    Carl Worth 
    cworth at east.isi.edu
       
    Thu Mar 21 17:09:56 EST 2002
    
    
  
 >  > On Wed, Mar 20, 2002 at 01:11:54PM -0700, Roger Miller wrote:
 >  > > 11. v.transform doesn't work in the context of GRASS database management.
Here's a little script that I have been using to more easily transform
vector maps. v.transform.inplace takes care of doing the ASCII
export/import and cleans those files up when it's done. It also puts
its output into a vector map named the same as the original, (while
making a backup of the original as <map_name>_orig).
It's a quick little hack, but it's helped me.
-Carl
===File v.transform.inplace===================
#!/bin/sh
set -e
if [ $# -lt 2 ]; then
	echo "Usage: $0 vector_map pointsfile" >&2
	echo "Transform a vector map according to pointsfile" >&2
	echo "The untransformed map will be saved with a prefix of _orig" >&2
	echo "See the documentation of v.transform for the format of pointsfile." >&2
	exit 1
fi
set -x
map=$1
pointsfile=$2
v.out.ascii input=${map} output=${map}_orig
v.transform input=${map}_orig output=${map}_transformed pointsfile=${pointsfile}
g.rename vect=${map},${map}_orig
v.in.ascii input=${map}_transformed output=${map}
v.support map=${map}
rm $LOCATION/dig_ascii/${map}_orig
rm $LOCATION/dig_ascii/${map}_transformed
===============================================
    
    
More information about the grass-dev
mailing list