[gdal-dev] SetNoDataValue on in-memory datasets via python

Jacob Adams Jacob.Adams at cachecounty.org
Mon Dec 18 10:18:07 PST 2017


*facepalm*

Happy Monday, everyone. 

Jake
>>> Even Rouault <even.rouault at spatialys.com> 12/18/2017 11:04 AM >>>
Jake,
 
> 
> mem_s_fh = gdal.GetDriverByName("MEM").Create('', temp_cols, temp_rows,
> 1, gdal.GDT_Float32) mem_s_fh.SetGeoTransform([0, cell_size, 0, 0, 0,
> cell_size])
> mem_s_fh.SetNoDataValue(s_nodata)
 
SetNoDataValue() is a rasterband level method, not dataset.
 
So should be s_band.SetNoDataValue(s_nodata)
 
> s_band = mem_s_fh.GetRasterBand(1)
 
Even
 
-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171218/21ce68ac/attachment.html>


More information about the gdal-dev mailing list