Skip to main content
deleted 57 characters in body
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

I am trying to use gdal.FillNodata in python on a ".tif" raster. The nodata value is set to -3.402823e+38. Here is my code :

import gdal
from gdalconst import *

ET = gdal.Open("ET_sample_reclass.tif", GA_Update) 
ETband = ET.GetRasterBand(1)

result = gdal.FillNodata(targetBand = ETband, maskBand = None, 
                     maxSearchDist = 5, smoothingIterations = 0)

print result # return 0

This code seems to do actually nothing and I don't know how to define an output raster in python. I haven't found any example yet to enlighten me so any help would be appreciated.

Thank you,

Gilbert

I am trying to use gdal.FillNodata in python on a ".tif" raster. The nodata value is set to -3.402823e+38. Here is my code :

import gdal
from gdalconst import *

ET = gdal.Open("ET_sample_reclass.tif", GA_Update) 
ETband = ET.GetRasterBand(1)

result = gdal.FillNodata(targetBand = ETband, maskBand = None, 
                     maxSearchDist = 5, smoothingIterations = 0)

print result # return 0

This code seems to do actually nothing and I don't know how to define an output raster in python. I haven't found any example yet to enlighten me so any help would be appreciated.

Thank you,

Gilbert

I am trying to use gdal.FillNodata in python on a ".tif" raster. The nodata value is set to -3.402823e+38. Here is my code :

import gdal
from gdalconst import *

ET = gdal.Open("ET_sample_reclass.tif", GA_Update) 
ETband = ET.GetRasterBand(1)

result = gdal.FillNodata(targetBand = ETband, maskBand = None, 
                     maxSearchDist = 5, smoothingIterations = 0)

print result # return 0

This code seems to do actually nothing and I don't know how to define an output raster in python. I haven't found any example yet to enlighten me.

Source Link
Delforge
  • 332
  • 2
  • 8

How to use gdal.FillNodata in python?

I am trying to use gdal.FillNodata in python on a ".tif" raster. The nodata value is set to -3.402823e+38. Here is my code :

import gdal
from gdalconst import *

ET = gdal.Open("ET_sample_reclass.tif", GA_Update) 
ETband = ET.GetRasterBand(1)

result = gdal.FillNodata(targetBand = ETband, maskBand = None, 
                     maxSearchDist = 5, smoothingIterations = 0)

print result # return 0

This code seems to do actually nothing and I don't know how to define an output raster in python. I haven't found any example yet to enlighten me so any help would be appreciated.

Thank you,

Gilbert