Hi Kyle
It might be a little bit of a detour for reaching your goal, but if you're
already using gdal inside python you could use numpy masked arrays to fill
in no data values. I do that for that goal.
here is a snippet from my code:
def ClipPolution(nameOfMask, nameOfPolutionRaster):
'''This function takes in two rasters, and returns a cliped raster,
with NULL (-9999) values
For all points out side of the domain of interest'''
dataset = gdal.Open(nameOfPolutionRaster, GA_ReadOnly)
dataSetMask = gdal.Open(nameOfMask, GA_ReadOnly)
areaOfPolution = gdal_array.DatasetReadAsArray(dataset)
maska = gdal_array.DatasetReadAsArray(dataSetMask)
clip = ma.MaskedArray(areaOfPolution, mask=maska)
cclip=ma.filled(clip,value=-9999)
WriteRaster('p4masked.asc', cclip)
print 'Successfuly Cliped polution Raster...'
you can find more stuff here:
http://docs.scipy.org/doc/numpy/reference/maskedarray.html
Hope it helps some how
Oz Nahum
Graduate Student
Center for Applied Geosciences
University of Tuebingen
--
----
Imagine there's no countries
It isn't hard to do
Nothing to kill or die for
And no religion too
Imagine all the people
Living life in peace
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev