[GRASSLIST:9999] v.buffer: categories, islands, centroids

Wolfgang Qual Wolfgang.Qual at gmx.net
Wed Jan 25 07:21:12 EST 2006


Dear list,
again, I have some questions on v.buffer, v.to.db, v.category and the things
which are related to this.

*Starting point*
A small GRASS-theme (line) which looks like this:

  ----------------------
     |         |             -----------
     |         |
   ----------------

The attribute table had an entry for each line. I wanted to create a buffer
around this line theme (polygon). I expected to receive a polygon theme with
two elements with one polygon beeing a donut-polygon.

Using the following command

v.buffer in=ausschnitt out=aus_buf_l buffer=50 type=line

This worked perfectly for the geometry. I got two polygon elements, *two
centroids* (That's what I wanted to have) with an island polygon (layer 0). 

Now, I planned to attach some information to these two elements, let's say
the area of the polygons. To do so, I added a new column and used v.to.db
option "area" to upload the values for area of the polygons. However, I
realized then that 

a) the two elements of the attribute table contained two identical
cat-values (why that? Did I do something wrong? I guess there is a meaning
for this, but I do not understand it.)
b) therefore, values for "area" were also identical.

Afterwards, I tried to find out, how I could create unique cat-values. One
solution suggested was to delete the old cat-values to assign new ones using
v.category (That was ok in my opinion, as the former cat values both were
"1" and had nothing to do with the original line theme). However, doing
this, GRASS created a new centroid within the island polygon:

GRASS 6.1.cvs (apug_neu):~ > v.category input=aus_buf_l out=aus_buff_neu
option=add 
1 new centroids placed in output map
Building topology ...

And that's not exactly what I wanted to have (see above, sigh.). I really
hope that there is a way to do it. I really would appreciate your
comments/tips.

Best regards,

Wolfgang




-- 
Telefonieren Sie schon oder sparen Sie noch?
NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie




More information about the grass-user mailing list