[GRASSLIST:4192] Adding CATS to buffered lines (Grass5.7)
Craig Aumann
caumann at ualberta.ca
Mon Aug 16 19:22:09 EDT 2004
The way I've cobbled CATs onto buffered lines is given below.
I have two questions:
- Is there a better way to do this?
- What is the appropriate tool to use for v.clean after I have patched
everything together? The tool svtlx (listed in the man page for
v.patch) does not exist in v.clean.
I'm not that concerned about the intersections between the buffered
lines - they could be assigned to the CAT for any of the original
lines.
declare -i MYCOUNTER
MYCOUNTER=1
for MYCAT in 13 3 12 2;
do
v.extract input=seismicselect output=seismicselecttemp \
list=$MYCAT new=-1
## buffer it.
v.buffer input=seismicselecttemp output=seistempbuf type=line buffer=3
v.category input=seistempbuf output=seistempbuf2 type=centroid \
option=add field=2 step=1
v.category input=seistempbuf2 output=seistempbuf3 type=centroid \
option=sum field=2 cat=-1
v.category input=seistempbuf3 output=seistempbuf1 type=centroid \
option=sum field=2 cat=$MYCAT
if test "$MYCOUNTER" -eq 1; then
let "MYCOUNTER=$MYCOUNTER+1"
v.patch input=seistempbuf1 output=seisfintemp
else
v.patch input=seistempbuf1,seisfintemp output=seisfintemp2
g.remove vect=seisfintemp
g.copy vect=seisfintemp2,seisfintemp
fi
done
v.category input=seisfintemp option=report
More information about the grass-user
mailing list