Opened 10 years ago

Closed 2 years ago

Last modified 2 years ago

#2020 closed enhancement (fixed)

Raster bands could have methods: HasNoDataValue and ClearNoDataValue

Reported by: Ari Jolma Owned by: warmerdam
Priority: normal Milestone: 2.1.0
Component: default Version: svn-trunk
Severity: normal Keywords:
Cc: Kyle Shannon

Description

GDALRasterBand class is lacking methods for checking if the band has a no data value and clearing the no data value. For example currently it is possible to set the no data value but impossible to clear it except by changing it something else. The current method for checking if there is a no data value assigned is a bit vague: "an out of range value will generally be returned".

Ari

Change History (5)

comment:1 Changed 10 years ago by warmerdam

Ari,

To find out if a nodata value exists, call GetNoDataValue?() and pass in the bSuccess flag, and check it on return.

Indeed there is no way to clear nodata (and a number of other similar items) which is annoying. I'll leave this open as an enhancement request for that part though I'm not sure how I'd do it without adding a bunch of new functions which I hate doing.

comment:2 Changed 4 years ago by Kyle Shannon

Cc: Kyle Shannon added

comment:3 Changed 3 years ago by Jukka Rahkonen

Feels like clearing nodata would be a good option for gdal_edit.py http://www.gdal.org/gdal_edit.html.

comment:4 Changed 2 years ago by Kyle Shannon

Milestone: 2.0
Resolution: fixed
Status: newclosed
Version: unspecifiedsvn-trunk

comment:5 Changed 2 years ago by Kyle Shannon

Milestone: 2.02.1.0
Note: See TracTickets for help on using tickets.