[Processing] Fix raster tools

GDAL arguments need to be str since they are passed as unencoded const
char*.
This commit is contained in:
Matthias Kuhn 2016-01-28 15:51:20 +01:00
parent 82c9a5ad3c
commit 2f411afe75

View File

@ -107,7 +107,7 @@ class RasterWriter:
driver = gdal.GetDriverByName(format)
dst_ds = driver.Create(self.fileName, self.nx, self.ny, 1,
gdal.GDT_Float32)
dst_ds.SetProjection(unicode(self.crs.toWkt()))
dst_ds.SetProjection(str(self.crs.toWkt()))
dst_ds.SetGeoTransform([self.minx, self.cellsize, 0,
self.maxy, self.cellsize, 0])
dst_ds.GetRasterBand(1).WriteArray(self.matrix)