[GRASS-user] difference between the sum and num options in v.rast.stats

Hi,

what is the difference between the sum and num options in v.rast.stats? comparing the results of the two columns they appear to be the same, but I’m sure I’m missing something.
Thanks for any pointers

···

Best regards,

Dr. Margherita DI LEO
Scientific / technical project officer
European Commission - DG JRC
Institute for Environment and Sustainability (IES)
Via Fermi, 2749
I-21027 Ispra (VA) - Italy - TP 261

Tel. +39 0332 78 3600
margherita.di-leo@jrc.ec.europa.eu

Disclaimer: The views expressed are purely those of the writer and may not in any circumstance be regarded as stating an official position of the European Commission.

On 12.02.2015 11:43, Margherita Di Leo wrote:

Hi,

what is the difference between the sum and num options in v.rast.stats?
comparing the results of the two columns they appear to be the same, but
I'm sure I'm missing something.
Thanks for any pointers

Hello Madi.

"statistics are calculated per vector category (cat) from the raster map". So, maybe there is nothing wrong in this very case of yours?

Nikos

Hi Nikos,

···

On Thu, Feb 12, 2015 at 11:31 AM, Nikos Alexandris <nik@nikosalexandris.net> wrote:

On 12.02.2015 11:43, Margherita Di Leo wrote:

Hi,

what is the difference between the sum and num options in v.rast.stats?
comparing the results of the two columns they appear to be the same, but
I’m sure I’m missing something.
Thanks for any pointers

Hello Madi.

“statistics are calculated per vector category (cat) from the raster map”. So, maybe there is nothing wrong in this very case of yours?

Sorry I was unclear. I don’t think there is something wrong, I was just wondering : what is the difference between the two options for method: “sum” and “num”. Because they are two different options, but in my case provide same result.

Best regards,

Dr. Margherita DI LEO
Scientific / technical project officer

European Commission - DG JRC
Institute for Environment and Sustainability (IES)
Via Fermi, 2749
I-21027 Ispra (VA) - Italy - TP 261

Tel. +39 0332 78 3600
margherita.di-leo@jrc.ec.europa.eu

Disclaimer: The views expressed are purely those of the writer and may not in any circumstance be regarded as stating an official position of the European Commission.

Hi, Margherita

sum is the sum of values and “num” (n) is the number of cells,
if you have all cells = 1, in this case sum = num
if this is not the case (all cells = 1) maybe something is wrong …

···

what is the difference between the sum and num options in v.rast.stats?
comparing the results of the two columns they appear to be the same, but
I’m sure I’m missing something.
Thanks for any pointers

Roy,

···

On Thu, Feb 12, 2015 at 12:01 PM, Roy <royroge@outlook.com> wrote:

Hi, Margherita

sum is the sum of values and “num” (n) is the number of cells,
if you have all cells = 1, in this case sum = num
if this is not the case (all cells = 1) maybe something is wrong …

Thank you, now is clear. No error, the result is correct.

what is the difference between the sum and num options in v.rast.stats?
comparing the results of the two columns they appear to be the same, but
I’m sure I’m missing something.
Thanks for any pointers

Best regards,

Dr. Margherita DI LEO
Scientific / technical project officer

European Commission - DG JRC
Institute for Environment and Sustainability (IES)
Via Fermi, 2749
I-21027 Ispra (VA) - Italy - TP 261

Tel. +39 0332 78 3600
margherita.di-leo@jrc.ec.europa.eu

Disclaimer: The views expressed are purely those of the writer and may not in any circumstance be regarded as stating an official position of the European Commission.