I have a technichal doubt. I used v.to.rast.constant to tranform a line vector layer to raster. This meant i have a raster with NULL values.
The output raster is to be used in map algebra operations.
So my question is: Is it advisable to set the Null cells to 0? I know r.calc works with NULL values, and I know that NULL is not the same as 0, however I never understood what difference does it make if any. Considering these two scenarios what do I win and what do I loose?
Any enlightening will be very aprecciated!
Thanks,
André Mano
Associação Leonel Trindade
SOCIEDADE DE HISTÓRIA NATURAL
Apartado 25 2564-909 Torres Vedras Portugal
Sede e Biblioteca: rua Cavaleiros da Espora Dourada, 27A 2560 Torres Vedras
I have a technichal doubt. I used v.to.rast.constant to tranform a line vector layer to raster. This meant i have a raster with NULL values.
The output raster is to be used in map algebra operations.
So my question is: Is it advisable to set the Null cells to 0? I know r.calc works with NULL values, and I know that NULL is not the same as 0, however I never understood what difference does it make if any. Considering these two scenarios what do I win and what do I loose?
Any enlightening will be very aprecciated!
Thanks,
André Mano
Associação Leonel Trindade
SOCIEDADE DE HISTÓRIA NATURAL
Apartado 25 2564-909 Torres Vedras Portugal
Sede e Biblioteca: rua Cavaleiros da Espora Dourada, 27A 2560 Torres Vedras
On Sun, Feb 05, 2012 at 07:22:29AM -0200, Daniel Victoria wrote:
Hi Andre,
On raster algebra, operations using null will return null while operations
with 0 behaves like expected. Ex:
12 x null = null
12 x 0 = 0
Also means do not behave the same on NULL, for example when using r.univar
(according to my understanding of the documentation, haven't tested)
NULL cells are excluded from the computation, so 1 cell with a value 1
and 9 NULL will give a mean of 1 while 1 cell with a value 1 and 9 with
value 0 will give a mean of 0.1.
On Sun, Feb 05, 2012 at 07:22:29AM -0200, Daniel Victoria wrote:
Hi Andre,
On raster algebra, operations using null will return null while operations
with 0 behaves like expected. Ex:
12 x null = null
12 x 0 = 0
Also means do not behave the same on NULL, for example when using r.univar
(according to my understanding of the documentation, haven’t tested)
NULL cells are excluded from the computation, so 1 cell with a value 1
and 9 NULL will give a mean of 1 while 1 cell with a value 1 and 9 with
value 0 will give a mean of 0.1.