lutraconsulting / serval

QGIS plugin for setting raster pixel values
41 stars 11 forks source link

Buffer too smal - serval 0.8 QGIS 2.14 #9

Closed saberraz closed 8 years ago

saberraz commented 8 years ago

Traceback (most recent call last): File "C:/Users/saber/.qgis2/python/plugins\Serval\serval.py", line 385, in pointClicked self.changeCellValue(new_vals) File "C:/Users/saber/.qgis2/python/plugins\Serval\serval.py", line 419, in changeCellValue self.bands[nr]['data'].WriteRaster(x, y, 1, 1, rbuf) File "C:\OSGEO4~1\apps\Python27\lib\site-packages\osgeo\gdal.py", line 2126, in WriteRaster return _gdal.Band_WriteRaster(self, _args, *_kwargs) RuntimeError: Buffer too smal [Uploading test.zip…]()

saberraz commented 8 years ago

test.zip

erpas commented 8 years ago

Your test raster has a mismatched metadata: plugin tries to read/write the raster as type Float32, whereas band data are of type Float32. Nevertheless, your test raster inspired me to properly treat each type of raster (except complex data type), so thanks a lot!