[GRASS-user] Fwd: concentric circles/regions in vector

Maciej Sieczka tutey at o2.pl
Thu Feb 22 12:31:55 EST 2007

Joel Pitt wrote:
> ---------- Forwarded message ----------
> From: Joel Pitt <joel.pitt at gmail.com>
> Date: Feb 21, 2007 12:58 PM
> Subject: concentric circles/regions in vector
> To: GRASSLIST <grasslist at baylor.edu>
> Hi all,
> I'm trying to create a vector of concentric circles showing a spread
> phenomenon and attaching a year to each circle. Currently I am looping
> through the following process:
> # Create circle
> "v.buffer input=%s output=%s buffer=%f" %
> (centre_map_name,uniform_name,radius)
> # add table with year column to uniform_name map
> 'v.db.addtable map=%s columns="year int" ' % (uniform_name)
> # update uniform_name map DB with year
> 'v.db.update map=%s column=year value=%d' % (uniform_name,year)
> # merge with existing map
> "v.patch --o -e -a input=%s output=%s" % (uniform_name, merge_map)


After you patch two (or more) such concentric circles-areas, you end up
with the inner circle having multiple centroids, while no centroid is
assigned to any of the outer circles (as all centroids are contained
within the inner one).

In a result, you can't add any attributes to those outer circles (as
attributes are attached to centroids, and all them are within the inner
circle). This might be a reason of your problems.

> This creates a vector map with concentric circles, but I am unable to
> select them using "year=2000" - only a point/centroid shows up.

Why do you mean by "select"? v.extract, d.vect where=, else?

> So my question is whether vector types other than centroids/points can
> link to a row in a database table?


> If not, then can anyone think of a way to do something similar? I'd
> rather not have to have excessive numbers of vector maps.

You need to get rid of the multiple centroids in the inner circle
(v.clean tool=rmdac), then add centroids to outer circles-areas, where
they are missing missing (v.centroids).


More information about the grass-user mailing list