On Fri, Aug 23, 2013 at 10:04 AM, Hermann Peifer <[email protected]> wrote: > On 2013-08-23 15:23, Even Rouault wrote: >> >> Selon peifer <[email protected]>: >> >>> Hi, >>> >>> http://www.gdal.org/gdal_edit.html states about -a_nodata >>> >>>> Assign a specified nodata value to output bands. >>>> Can be set to none to remove a nodata value if one exists for the >>>> dataset. >>> >>> >>> I assume that none means the literal string `none', but what happens is >>> given below. >>> >>> Is this just a plain bug or am I doing something terribly wrong? >> >> >> Hi Hermann, >> >> This is a documentation bug. This is not supported by the code. And >> there's no >> (standard) way in the GDAL API to remove a nodata value once it is set. >> >> Could you file a ticket about that ? >> > > Done, see http://trac.osgeo.org/gdal/ticket/5213 > > Hermann > > > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev
Even, According to the docs at http://gdal.org/classGDALRasterBand.html#ac6f081d253dee55c372e54cfdd8f05a6 """To clear the nodata value, just set it with an "out of range" value. Complex band no data values must have an imagery component of zero.""" This seems a little unreliable though, especially if changing the data type in gdal_translate or some other app. If the no data value is copied and is within the new range for the new data type, the behavior is unexpected(I think). Should the docs state that once a no data value is set, in cannot be unset as well? I'm a bit confused. kss _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
