[GRASS-user] Determining maximum value of attributes where areas are overlapping in imported vector layer

Markus Neteler neteler at osgeo.org
Mon Jul 7 15:37:58 EDT 2008


On Mon, Jul 7, 2008 at 6:28 PM, Rainer M Krug <r.m.krug at gmail.com> wrote:
> On Mon, Jul 7, 2008 at 6:19 PM, Markus Neteler <neteler at osgeo.org> wrote:
>> On Mon, Jul 7, 2008 at 6:11 PM, Rainer M Krug <r.m.krug at gmail.com> wrote:
>>> Hi
>>>
>>> I am back with a problem of imported shape files:
>>>
>>> I have imported a shape file and it contains several areas where
>>> polygons are overlapping. After I managed to obtain the number of
>>> overlapping polygons and exported it to a raster layer
>>> (http://grass.osgeo.org/wiki/Vector_Overlapping_Areas), I would now
>>> need the maximum value of an attribute column for this areas.
>>>
>>> Any ideas how I can achieve this?
>>
>> You can use 'db.select':
>>
>> echo "SELECT max(N1) FROM lidar2" | db.select
>> max(N1)
>> 512834.76000000000931
>
> Sorry for not being spoecific enough - I want the maximum values as
> ributes in an attribute table.
> As far as I can see, this just gives me the maximum value of the whole
> table - but I need it spatially, i.e. for each area which is
> overlapping, the maximum value.

Then v.to.db might be helpful.
http://grass.osgeo.org/grass64/manuals/html64_user/v.to.db.html

-> see qcolumn parameter.

Markus


More information about the grass-user mailing list