Opened 16 years ago

Closed 9 years ago

Last modified 9 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 by warmerdam, 16 years ago

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 by Kyle Shannon, 11 years ago

Cc: Kyle Shannon added

comment:3 by Jukka Rahkonen, 9 years ago

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

comment:4 by Kyle Shannon, 9 years ago

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

comment:5 by Kyle Shannon, 9 years ago

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