[GRASS-user] Returning to an old bug...

Richard Chirgwin rchirgwin at ozemail.com.au
Sun Nov 16 16:27:13 EST 2008


Glynn Clements wrote:
> Richard Chirgwin wrote:
>
>   
>> A while back I noted that if patching very large numbers of files, GRASS
>> 6.3 generates frequent topo errors:
>>
>> ERROR: BUG (Vect_build_sidx_from_topo): area does not exist
>>
>> This can be reproduced in Spearfish:
>>
>> 1) Create individual points
>>
>> for i in `echo "select cat from bugsites" | db.select`; do
>> v.extract input=$i output="bugsites_""$i" where=cat=$i; done
>>
>> 2) Buffer individual points
>> for i in `g.mlist vect pattern="bugsites_*"`; do
>> v.buffer input=$i output="buffer_""$i" buffer=500; done
>>
>> 3) Add tables to buffers
>> for i in `g.mlist vect pattern="buffer_*"`; do
>> v.db.addtable map=$i; done
>>
>> 4) Overlay buffers with areas
>> for i in `g.mlist vect pattern="buffer_*"; do
>> v.overlay ainput=$i binput=trn_sites output="overlay_""$i" operator=and;
>> done
>>
>> 5) Create target patch map
>> for i in `g.mlist vect pattern="overlay_*"`; do
>> v.patch -a -e input=$i output=patch --overwrite; done
>>
>>
>> Can anyone suggest solutions? It would be nice to avoid having to patch
>> a bunch of maps by hand to avoid the error!
>>     
>
> Run v.build after each v.patch:
>
> 	for i in `g.mlist vect pattern="overlay_*"`; do
> 		v.patch -a -e input=$i output=patch --overwrite
> 		v.build patch
> 	done
>   
After some testing there seems to be a region issue with maps causing
the failure. If I add a d.vect into the patch script command, then a map
that causes failure will also report "The bounding box is outside the
current region, nothing drawn" at the d.vect command.

And if I add the build command, things work cleanly. So here are the two
processes, one that works, one that doesn't.

Not working:
for i in `g.mlist vect pattern="Overlay*"`; do
echo $i;
d.vect $i;
v.patch -a -e input=$i output=Patch --overwrite;
sleep 2;
done

(the "sleep" is there to give me a couple of seconds to look at the
mapname!)

Working:
for i in `g.mlist vect pattern="Overlay*"`; do
echo $i;
d.vect $i;
v.patch -a -e input=$i output=Patch --overwrite;
v.build Patch;
sleep 2;
done

Richard


More information about the grass-user mailing list