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!
On Thu, Nov 13, 2008 at 9:58 PM, Richard Chirgwin
<rchirgwin@ozemail.com.au> 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:
Did you try the example?
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
# added database if not running in PERMANENT; fixed v.extract:
for i in `echo "select cat from bugsites" | db.select
database='$GISDBASE/$LOCATION_NAME/PERMANENT/dbf/'`; do
v.extract input=bugsites 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
ok
3) Add tables to buffers
for i in `g.mlist vect pattern="buffer_*"`; do
v.db.addtable map=$i; done
ok
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
# fixed:
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
What is the scope of the last command (5)?
Markus
Can anyone suggest solutions? It would be nice to avoid having to patch
a bunch of maps by hand to avoid the error!
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
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
Ok, that does the trick; thank you Glynn, also Markus (and my apologies
for my typos in the e-mail!).
I had assumed that the topology build within the patch process should work!
>>> I had assumed that the topology build within the patch process
>>> should work!
>> Me, too. I see that
>> Vect_build(&OutMap);
>> isnt't there in the
>> if (append->answer) {
>> part. May that be the problem?
> Maybe the idea is that you might want to perform multiple appends
> (ignoring the warnings) then just rebuild the topology once at the
> end?
> It might be worth checking whether this still produces the correct
> result. If it does, it will be quicker than rebuilding the topology
> at each step.
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