Greetings
I have a python script where I need to check if an input raster map has any valid pixel (at least one pixel that is not null). How can I check this (easy and quick way?) in order to be integrated in my Script?
Thjanks
Kim
Greetings
I have a python script where I need to check if an input raster map has any valid pixel (at least one pixel that is not null). How can I check this (easy and quick way?) in order to be integrated in my Script?
Thjanks
Kim
Kim Besson wrote:
I have a python script where I need to check if an input raster map has any
valid pixel (at least one pixel that is not null). How can I check this
(easy and quick way?) in order to be integrated in my Script?
Check the range:
$ r.mapcalc --o 'foo = null()'
$ r.info -r foo
min=NULL
max=NULL
The range can only have min=max=NULL if there are no non-null cells.
--
Glynn Clements <glynn@gclements.plus.com>
Thank Glynn. But how can I retrieve min and max using a Python Script?
2010/10/25 Glynn Clements <glynn@gclements.plus.com>
Kim Besson wrote:
I have a python script where I need to check if an input raster map has any
valid pixel (at least one pixel that is not null). How can I check this
(easy and quick way?) in order to be integrated in my Script?Check the range:
$ r.mapcalc --o ‘foo = null()’
$ r.info -r foo
min=NULL
max=NULLThe range can only have min=max=NULL if there are no non-null cells.
–
Glynn Clements <glynn@gclements.plus.com>