MCPcopy
hub / github.com/django/django / nodata_value

Method nodata_value

django/contrib/gis/gdal/raster/band.py:145–157  ·  view source on GitHub ↗

Return the nodata value for this band, or None if it isn't set.

(self)

Source from the content-addressed store, hash-verified

143
144 @property
145 def nodata_value(self):
146 """
147 Return the nodata value for this band, or None if it isn't set.
148 """
149 # Get value and nodata exists flag
150 nodata_exists = c_int()
151 value = capi.get_band_nodata_value(self._ptr, nodata_exists)
152 if not nodata_exists:
153 value = None
154 # If the pixeltype is an integer, convert to int
155 elif self.datatype() in GDAL_INTEGER_TYPES:
156 value = int(value)
157 return value
158
159 @nodata_value.setter
160 def nodata_value(self, value):

Callers

nothing calls this directly

Calls 2

datatypeMethod · 0.95
_flushMethod · 0.95

Tested by

no test coverage detected