Commit 20cf3b9b authored by Hoek, Steven's avatar Hoek, Steven
Browse files

Made sure that when the nodatavalue is set, it is cast to the right datatype

parent 7c75be9b
......@@ -117,7 +117,10 @@ class BandRaster(GridEnvelope2D, Raster):
self.xul = ulxmap - 0.5*self.dx
self.yul = ulymap + 0.5*self.dy
hl = hf.readline();
self.nodatavalue = int(hl.replace('NODATA', ''));
if self.dataformat in ['f', 'd']:
self.nodatavalue = float(hl.replace('NODATA', '').strip());
self.nodatavalue = int(hl.replace('NODATA', '').strip());
# Assume that the rest of the information has to be read from a world file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment