2

I'm running QGIS 3.28.8 on Windows 10, Python 3.9.5.

In the Python interpreter when I run

from qgis.core import QgsRasterCalculator

I receive the following error:

ImportError: cannot import name 'QgsRasterCalculator' from 'qgis.core'

Has QgsRasterCalculator moved?

1 Answer 1

3

The QgsRasterCalculator class is part of the analysis module:

https://qgis.org/pyqgis/3.28/analysis/QgsRasterCalculator.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.