[GRASS-dev] vector group by based on attribute table

Pietro peter.zamb at gmail.com
Wed Mar 4 06:14:07 PST 2015


Dear all,

I'm looking for a GRASS module that unify the geometries and the
values, If I have a configuration like:

geo features  |  cat   |   id | A  | B
geofeature1 => cat1, id1, a1, b1
geofeature2 => cat2, id1, a2, b2
geofeature3 => cat3, id2, a3, b3
geofeature4 => cat4, id2, a4, b4
geofeature5 => cat5, id2, a5, b5

I would like to have something like:

SELECT id, mean(A) as meanA, mean(B) as meanB FROM table GROUP BY id;

geo features           |  cat   | meanA      | meanB
geo1, geo2           => id1, mean(a1, a2), mean(b1, b2)
geo3, geo4, geo5 => id2, mean(a3, a4, a5), mean(b3, b4, b5)

There is already something to do this simple operation?
Do you have any suggestions?

Thank you

Pietro


More information about the grass-dev mailing list