Wed, Jan 26 2005
21:30:04
|
|
Request created by guest
|
|
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 |
|
Thu, Jan 27 2005
09:07:48
|
|
Mail sent by blazek@itc.it
|
|
Return-Path |
<blazek@itc.it>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
Message-ID |
<41F8A146.4080408@itc.it>
|
Date |
Thu, 27 Jan 2005 09:07:34 +0100
|
From |
Radim Blazek <blazek@itc.it>
|
User-Agent |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113
|
X-Accept-Language |
en-us, en
|
MIME-Version |
1.0
|
To |
Request Tracker <grass-bugs@intevation.de>
|
Cc |
grass5@grass.itc.it
|
Subject |
Re: [GRASS5] [bug #2944] (grass) v.extract seg.faults
|
References |
<20050126203004.78DA9102BCD@lists.intevation.de>
|
In-Reply-To |
<20050126203004.78DA9102BCD@lists.intevation.de>
|
Content-Type |
text/plain; charset=us-ascii; format=flowed
|
Content-Transfer-Encoding |
7bit
|
X-Spam-Status |
No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
|
X-Spam-Level |
|
Request Tracker wrote:
> 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.
This is a wish not a bug.
You can either run v.extr
You have to create third layer (or add new attribute to one layer)
and upload the attributes from layer 1 and 2 to layer 3
(v.to.db option=query qcol=), then use v.extract on layer 3.
Just for curiosity, can you tell us what your 2 layers represent and why
you need to query both?
> If the layer is set to -1 or 2 v.extract seg faults!
Fixed, but the only difference is that you get fatal error not seg
fault. 'where' with 'layer=-1' does not make sense.
Radim
>
> 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
>
> _______________________________________________
> grass5 mailing list
> grass5@grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5
|
|
Thu, Jan 27 2005
16:44:34
|
|
Mail sent by rnuske@gwdg.de
|
|
Return-Path |
<rnuske@gwdg.de>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
X-Originating-IP |
rnuske[134.76.193.207]
|
Content-Type |
text/plain; charset=iso-8859-1
|
Date |
Thu, 27 Jan 2005 16:44:19 +0100
|
In-Reply-To |
<7C7FE7A8AF09A048AEAF73F6896170DE05C4E97F@fcex3.forestry.gov.uk>
|
MIME-Version |
1.0
|
Subject |
Re: [bug #2944] (grass) v.extract seg.faults
|
Content-Transfer-Encoding |
8bit
|
User-Agent |
IMHO/0.98.3+G (Webmail for Roxen)
|
From |
Robert S.Nuske <rnuske@gwdg.de>
|
To |
Radim Blazek via RT <grass-bugs@intevation.de>
|
X-Virus-Scanned |
(clean) by exiscan+sophie
|
Message-Id |
<20050127154430.DA6E136CDD@mail.intevation.de>
|
X-Spam-Status |
No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
|
X-Spam-Level |
|
> This is a wish not a bug.
I considered it a bug, since the manual page does not state that the layer
and where argument are mutually exclusive, but I may be wrong.
I think it worked in an earlier version, since I was reproducing an exercise
from GDF's grass tutorial, where both layers were extracted with layer
argument not specified.
> > If the layer is set to -1 or 2 v.extract seg faults!
>
> Fixed, but the only difference is that you get fatal error not seg
> fault. 'where' with 'layer=-1' does not make sense.
okay, it doesn't make sense to issue 'where' with 'layer=-1' but why can't I
ask v.extract for the second layer?
so, it's not possible anyhow to do a selection with v.extract and have both
layers in the resulting vector-file ?
> You can either run v.extr
> You have to create third layer (or add new attribute to one layer)
> and upload the attributes from layer 1 and 2 to layer 3
> (v.to.db option=query qcol=), then use v.extract on layer 3.
a probably easier workaround is to use v.select with the original 2-layered
point vector and the 1-layered point vector I got from v.extract.
> Just for curiosity, can you tell us what your 2 layers represent and why
> you need to query both?
The goal was to run v.net.alloc which asks for an arc layer and a node layer.
After patching my points (with 2 layers) with a road network and providing
the connection between the points and the roads, I got the centres to which
net will be allocated in the second layer and the arcs in the first layer. Is
that
correct or exist a better way to do it?
Robert
|
|
Thu, Sep 8 2005
10:07:41
|
|
Mail sent by msieczka
|
|
Robert,
Looks like this problem is resolved. Please let me know if I can close your
bug report.
Best,
Maciek |
|
Thu, Sep 8 2005
18:05:11
|
|
Mail sent by rnuske@gwdg.de
|
|
Return-Path |
<rnuske@gwdg.de>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
From |
Robert Nuske <rnuske@gwdg.de>
|
Reply-To |
rnuske@gwdg.de
|
Organization |
Uni =?iso-8859-1?q?G=F6ttingen?=
|
To |
Maciek Sieczka via RT <grass-bugs@intevation.de>
|
Subject |
Re: [bug #2944] (grass) v.extract seg.faults
|
Date |
Thu, 8 Sep 2005 18:08:37 +0200
|
User-Agent |
KMail/1.7.2
|
References |
<20050908080741.80A631006D0@lists.intevation.de>
|
In-Reply-To |
<20050908080741.80A631006D0@lists.intevation.de>
|
MIME-Version |
1.0
|
Content-Type |
text/plain; charset="iso-8859-1"
|
Content-Transfer-Encoding |
7bit
|
Content-Disposition |
inline
|
Message-Id |
<200509081808.37437.rnuske@gwdg.de>
|
X-Virus-Scanned |
(clean) by exiscan+sophie
|
X-Spam-Status |
No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
|
X-Spam-Level |
|
Hi Maciek,
I checked my old bug report.
v.extract doesn't cause any segmentation faults anymore, which is great.
It even has a meaningful error message, which is more than expected.
Never-the-less, my original problem still exists. There is no way to extract
from 2 layers or from the 2nd layer using a where-clause. I expected that to
be possible, according to the manual page. As explained before, I believe it
was possible in former times.
Am I wrong?
So, I would conclude: My subject line is (now) misleading.
cheers,
robert
Maciek Sieczka via RT wrote:
> Robert,
>
>
>
> Looks like this problem is resolved. Please let me know if I can close your
>
> bug report.
>
>
>
> Best,
>
> Maciek
>
> -------------------------------------------- Managed by Request Tracker
--
____________________________________
Robert Nuske
Institute for Forest Biometrics &
Applied Computer Science
Buesgenweg 4
37077 Goettingen
GERMANY
Phone: +49-551-39-2362
Fax : +49-551-39-3465
|
|
Fri, Sep 16 2005
11:19:36
|
|
Status changed to resolved by msieczka
|
|
Fri, Sep 16 2005
11:19:36
|
|
Mail sent by msieczka
|
|
Robert Nuske wrote:
> Never-the-less, my original problem still exists. There is no way to extract
> from 2 layers or from the 2nd layer using a where-clause.
I'm not able to help you with that (my Grass knowlegde is still pretty
limited; I'm only cleaning here you know ;) ). My suggestion for you is to
start a thread regarding your problem on grasslist@baylor.edu. Eventually, if
it showes to be a bug or a missing feature indeed, then fill in an appropriate
bug report. I'll close this one for sanity's sake. Let me know if you mind.
Thanks for your cooperation.
Best,
Maciek |
|