[gdal-dev] GeoTiff null values

Filippo Corò filippo.coro at alice.it
Fri Jul 30 02:14:29 EDT 2010


Hi List,

I'm running tests with GDAL 1.7 and python  for achieving a function for  
the sum of GeoTIFF file. I found some difficulty in handling null values.
I wanted to know if you can assign a specific value (like 99) to null when  
I call the Open function.

The code is as follows:

# Open the image 1
primoDs=gdal.Open('eros.tif', GA_ReadOnly)

primoBand=primoDs.GetRasterBand(1)

If I use the following function:

noval=primoBand.GetNoDataValue()
print noval

I get:

0.0 with null value:

Is there any statement at this stage allow me to decide what value to  
assign to null, when I call gdal.open?

Thanks in Advance

Filippo Corò


-- 
Creato con il rivoluzionario client e-mail di Opera:  
http://www.opera.com/mail/


More information about the gdal-dev mailing list