<HTML>
<font style="font-family: tahoma; font-size: 10pt;"> <div>Dear Grass users,
<br /> <br />I get a very strange result with v.edit. Here is the story:
</div> <div> </div> <div>I have imported a vector map from a postgres
database and there are 3 overlapping areas. Then, I try to get the feature
ids(not the category) of the overlapping areas by using (as the overlapping
areas appear in layer 2 with cat=2): <br />v.edit map=test_shapes_newi
layer=2 tool=select cats=2 type=centroid <br />Ans the result is: <br />
---- <br />29,27 <br />Selecting features... <br />2 of 29 features
selected from vector map <test_shapes_newi@PERMANENT> <br />v.edit
complete. <br />--- <br />Thus, only two features are selected...
instead of 3....strange <br /> <br />Then, I tried to print the
category(in layer 1) for all features using: <br />v.category
input=test_shapes_new option="print" <br />and the result is: <br />---
<br />4 <br />6 <br />7 <br />2 <br />1/2 <br />1 <br />1/3
<br />3 <br />5 <br />3/5 <br />--- <br />So, we clearly see that 3
features have two categories in layer 1(and thus are overlapping), which is
consistent with what is indicated by v.in.ogr (and also with what I can see
when I display the map) <br /> <br />Then, if I get the ids of features
with cat=1 in layer1: <br />v.edit map=test_shapes_newi layer=1
tool=select cats=1 type=centroid <br />I correctly get 3 ids... <br />
<br />But if I ask for the features with cat=3 in layer1: <br />v.edit
map=test_shapes_newi layer=1 tool=select cats=3 type=centroid <br />
I get only 2 ids: <br />--- <br />29,27 <br />Selecting features...
<br />2 of 29 features selected from vector map
<test_shapes_newi@PERMANENT> <br />v.edit complete. <br />----
<br />which is clearly wrong if we compare with the list of categories
printed above... <br /> <br /> <br />I really don't understand
what is going wrong. The only reason I can think of is a bug in v.edit....
<br /> <br /> <br />Below, I have pasted the testfile I used to
produce these results. Please try to redo and tell me if you have the same
problem. Moreover, if you look at the text file, we can clearly see that
there are three features with two categories... <br /> <br />
<br />By the way, I take the opportunity to ask if someone knows an easy way
to transform overlapping areas into simple areas. Basically, I just want to
choose one of the two(or more) categories associated to an area and assign
it as the only category for that area. And I don't care about which category
is chosen among the 2 possible. </div> <div>My data are the areas of
countries and thus the overlaps I got are just because of some problems in
the none-topological version of the data. So, I just need to assign randomly
these overlaps to one of the neighbor area. <br />I tried v.clean
tool=rmdupl but it does nothing at all... <br />Now, I am fighting with
v.edit and I get the problem presented above... <br />So, if someone has
an easy solution to this problem, I would very glad. </div> <div>
</div> <div>Thank you in advance! <br /> <br /> </div> <div>
Marc-Antoine Nüssli <br /> </div> <div> <br /> <br />----------START
ASCII GRASS STANDARD FILE---------------------- <br /> <br />
ORGANIZATION: <br />DIGIT DATE: <br />DIGIT NAME:
nuessli <br />MAP NAME: <br />MAP
DATE: Tue Sep 01 13:01:32 2009 <br />MAP
SCALE: 1 <br />OTHER INFO: <br />
ZONE: 0 <br />MAP
THRESH: 0.000000 <br />VERTI: <br />B 5 <br />
158
131 <br />
211
301 <br />
108
333 <br />
75
254 <br />
158
131 <br />B 5 <br />
171.67467949 102.62660256 <br /> 182.29166667 94.41346154 <br
/> 194.71153846 71.77724359 <br /> 191.30608974 72.17788462
<br /> 171.67467949 102.62660256 <br />B 4 <br />
116.20338236 147.39430963 <br /> 114.22292076 131.55061682
<br /> 121.15453637 135.51154003 <br /> 116.20338236
147.39430963 <br />B 2 <br />
62
77 <br />
98.3258427 111.53932584 <br />B 2 <br />
98.3258427 111.53932584 <br />
123
135 <br />B 2 <br />
43
77 <br />
62
77 <br />B 3 <br
/> 62
77 <br />
69
77 <br />
98.3258427 111.53932584 <br />B 6 <br />
98.3258427 111.53932584 <br />
114
130 <br />
115
150 <br />
66
259 <br />
35
265 <br />
43
77 <br />B 3 <br
/> 158.08252615 122.19914762 <br />
156
116 <br />
168.5464684 106.24163569 <br />B 3 <br />
168.5464684 106.24163569 <br />
183
95 <br />
195
72 <br />B 3 <br
/> 123
135 <br />
71
255 <br /> 158.08252615
122.19914762 <br />B 2 <br /> 158.08252615 122.19914762 <br
/> 168.5464684 106.24163569 <br />B 7 <br />
168.5464684 106.24163569 <br />
191
72 <br />
151
70 <br />
37
72 <br />
37
160 <br />
40
74 <br />
62
77 <br />B 3 <br
/> 217
307 <br />
162
136 <br /> 181.12359551
190.78651685 <br />B 3 <br /> 181.12359551 190.78651685 <br
/> 199
242 <br /> 273.24466019
221.44466019 <br />B 4 <br /> 273.24466019 221.44466019 <br
/> 441
175 <br />
276
289 <br />
217
307 <br />B 4 <br />
195
72 <br />
414
45 <br />
436
172 <br /> 273.24466019
221.44466019 <br />B 3 <br /> 273.24466019 221.44466019 <br
/> 199
244 <br /> 181.12359551
190.78651685 <br />B 2 <br /> 181.12359551 190.78651685 <br
/> 158.08252615 122.19914762 <br />C 1 1 <br />
144.59283467 243.00698455 <br /> 1
4 <br />C 1 1 <br />
183.51855004 87.21392108 <br /> 1
6 <br />C 1 1 <br />
116.96146785 138.87668756 <br /> 1
7 <br />C 1 1 <br />
65.45911571 169.69098179 <br /> 1
2 <br />C 1 3 <br />
80.70905903 93.08952149 <br /> 1
1 <br />
1 2
<br /> 2
2 <br />C 1 1 <br />
135.07702133 128.59957381 <br /> 1
1 <br />C 1 3 <br />
161.92770396 113.80227654 <br /> 1
1 <br />
1 3
<br /> 2
2 <br />C 1 1 <br />
297.85655015 136.60482313 <br /> 1
3 <br />C 1 1 <br />
275.17021301 221.55107616 <br /> 1
5 <br />C 1 3 <br />
237.76816343 231.7223301 <br /> 1
3 <br />
1 5
<br /> 2
2 <br /> <br /> <br />
<br /> </div></font>
</HTML>