[GRASS-user] Buffered categories

Richard Chirgwin rchirgwin at ozemail.com.au
Thu Feb 23 16:06:43 EST 2012


Markus, Moritz and Hamish -

Thanks all; some responses.

On 24/02/12 7:40 AM, Markus Metz wrote:
> On Thu, Feb 23, 2012 at 8:14 PM, Hamish<hamish_b at yahoo.com>  wrote:
>> Moritz wrote:
>>> If you create buffers around points which have category
>>> values and you would like to assign those values to the buffers,
>>> you can then (after v.category) do something like this:
>>>
>>> v.db.addtable yourbuffers
>>> v.db.addcol yourbuffers col="pointcat int"
>>> v.distance from=yourbuffers to=yourpoints  dmax=0
>>> upload=cat column=pointcat
Moritz - the problem is that if the buffers are assigned a single cat to 
all their centroids (even when non-overlapping), there is only one cat 
value, and v.distance can't update.

Hence: v.db.select yourbuffers produces:
cat
1

rather than the 47 categories I need (because there are 47 distinct 
areas in the buffer.

So: how do I reassign the cats so there are 47 instead of 1 in the buffer?

Cheers,
Richard
>> except of course if two of those buffers overlap, in which case it is
>> ambiguous as to which starting category the merged buffer area should
>> take. (which is why v.buffer just assigns everything to category 1 instead
>> of preserving seed categories in the first place)
> Preserving seed categories is in theory easy, no need to assign new
> category 1 to all new areas. In ambiguous cases, you could assign all
> seed categories to the merged buffer area.
>
> Markus M
>



More information about the grass-user mailing list