[GRASS-dev] finding the hole of a donut
Maciej Sieczka
tutey at o2.pl
Sat Feb 23 10:22:55 EST 2008
Michael Barton pisze:
> It's kind of like wanting to extract the hole of a donut but NOT get the
> area outside the donut too.
>
> Any suggestions as to how to go about this?
#find the min & max category of your donuts
cat_min=`v.category donuts opt=print | head -n1`
cat_max=`v.category donuts opt=print | tail -n1`
# calculate 1st free cat
cat_1stfree=`expr $cat_max + 1`
# fills holes with jam
v.centroids in=donuts out=donuts_with_jam opt=add cat=$cat_1stfree st=1
# extract jam
v.extract -r in=donuts_with_jam out=jam type=area list=$cat_min-$cat_max
Maciek
More information about the grass-dev
mailing list