3

I am currently scripting a simple raster operation. But, since I must do it thousands of time I would prefer if the output could be in the same format as the input or, at least in Int16.

Yet, it seems it is not the case and the output weight is far superior to what I would expect based on the size of the two initial rasters.

calc = QgsRasterCalculator( 'Int(rast1@1  - rast2@1)', output, 'GTiff', resp1.extent(), resp1.width(), resp1.height(), entries)

Both raster (rast1 and rast2) are integer (Int16), yet the result is in float32.

Is there a way to compress it directly in QgsRasterCalculator?

  • Removed second question to prevent being too broad – PolyGeo Jun 16 '17 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.