this bug's URL: http://intevation.de/rt/webrt?serial_num=2944
-------------------------------------------------------------------------
Subject: v.extract seg.faults
Platform: GNU/Linux/i386 debian
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: 6.0.beta1
v.extract doesn't allow to extract two layers and to make a selection (where="str1='No Name'") at the same time. If one doesn't set the layer argument or sets the as layer=1,2 , only one layer is extracted.
If the layer is set to -1 or 2 v.extract seg faults!
Robert Nuske
EXAMPLE:
# add a second layer to archsites
v.category in=archsites out=archsites_2L layer=2 op=add
#checking for the second layer
v.category archsites_2L layer=1,2 op=print
1|1
2|2
3|3
[...]
25|25
# yes, it's there, as it should be.
db.describe -c archsites_2L
ncols:2
Column 1: cat
Column 2: str1
#first try to get a selection
v.extract in=archsites_2L out=NoName_1 type=point where="str1='No Name'"
Load cats from the database (table = archsites_2L,
db = /home/rnuske/luftbild/robert/grassdata/spearfish57/robert/dbf/).
12 cats loaded from the database
[snip]
Writing attributes ...
Layer 1
Done.
v.category NoName_1 layer=1,2 op=print
2|
5|
8|
9|
11|
13|
14|
15|
19|
20|
23|
25|
# => the correct points but only one of the two layers were extracted !
# asking grass to, please, extract both layers:
v.extract in=archsites_2L out=NoName_2 type=point layer=1,2 where="str1='No Name'"
[snip]
Writing attributes ...
Layer 1
Done.
# => same as above: the correct points but only one of the two layers were extracted !
# trying something else,
# force grass to write all layers or explicitly the 2nd layer
v.extract in=archsites_2L out=NoName_3 type=point layer=-1where="str1='No Name'"
Segmentation fault
v.extract in=archsites_2L out=NoName_4 type=point layer=2 where="str1='No Name'"
Segmentation fault
# => both results in segmentation faults !!
# curiously enough, extracting all layers w/o select statement, works just fine.
v.extract in=archsites_2L out=NoName_5 type=point layer=-1
[snip]
Writing attributes ...
Layer 1
Done.
Layer 2
No table.
v.category NoName_5 layer=1,2 op=print
1|1
2|2
3|3
...
25|25
-------------------------------------------- Managed by Request Tracker