Hi, Using the Python bindings, I am having trouble getting a memory raster to respect SetNoDataValue. It works with a GeoTiff(if I close and then reopen it for reading), I presume because everything gets written when the raster is closed. My code:
conc_band = t_ds.GetRasterBand(1) conc_band.SetNoDataValue(-32768) thick_band = t_ds.GetRasterBand(2) thick_band.SetNoDataValue(-32768) gdal.RasterizeLayer(t_ds, [1], layer, options=['ATTRIBUTE=CONC']) gdal.RasterizeLayer(t_ds, [2], layer, options=['ATTRIBUTE=THICK']) #t_ds.FlushCache() conc = conc_band.ReadAsArray() thick = thick_band.ReadAsArray() When I ReadAsArray, I get a 0 instead of -32768. I tried FlushCache (commented out above) but it did not help. How do I force the raster in memory to update before I reaqd it? Thanks, Brendan _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
