[Qgis-developer] worldfile update

Olivier Dalang olivier.dalang at gmail.com
Mon Apr 20 01:51:50 PDT 2015


Hi !

No one on this ?

Best,

Olivier

2015-04-14 13:48 GMT+02:00 Olivier Dalang <olivier.dalang at gmail.com>:

> Dear list,
>
> I need to be able to update a worldfile and see the changes reflected in
> QGIS.
>
> Actually, it almost works. The worldfile is reread on each refresh, and my
> changes are correctly taken into account.
> But the extent of the raster is not refreshed, so the raster is cropped to
> it's initial extent. When zoomed in, and doing some small adjustments, it's
> not a problem, but when doing bigger changes on the worldfile, the raster
> can even become completely invisible.
>
>
> The only workaround I found was to remove the raster and re-add it
> completely on each mapcanvas change. But it's an overkill and has a lot of
> drawbacks (styling, CRS, etc...)
>
> I tried those functions to refresh the extent :
>
> myRasterLayer.triggerRepaint()
> myRasterLayer.dataProvider().reload()
> myRasterLayer.recalculateExtents.emit()
> self.iface.mapCanvas().refresh()
>
> But none of them seem to do the trick... Am I missing the correct method ?
>
> Thanks !!
>
> Olivier
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150420/7fc0355a/attachment.html>


More information about the Qgis-developer mailing list