2

How can I set the zoomedInResampler of a Raster Layer to Cubic and the zoomedOutResampler to Average using PyQGIS?

2

Ok, looking deeper into the API helped:

rasterLayer = iface.activeLayer()
resampleFilter = rasterLayer.resampleFilter()
resampleFilter.setZoomedInResampler(QgsCubicRasterResampler())
resampleFilter.setZoomedOutResampler(QgsBilinearRasterResampler())

Your Answer

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

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