<div dir="ltr"><div class="" itemprop="text">

<p>Sorry for cross-posting. I have asked that question before on StackExchange [1] without much success. I would be very thankful if you can point me in the right direction. <br></p><p></p><p>I would like to change a raster cell value from Python in QGIS using 
QgsRasterDataProvider.write method. It takes the following arguments <a href="http://qgis.org/api/classQgsRasterDataProvider.html#af15b6038b5c59276a4ef87598b919482" rel="nofollow"> (from QGIS API)</a>:</p>

<pre><code>virtual bool QgsRasterDataProvider::write   (   
    void *      data,
    int     band,
    int     width,
    int     height,
    int     xOffset,
    int     yOffset 
)
</code></pre>

<p>How can I construct the pointer (data) with a new cell value? <br></p><p>I am working on a plugin modifying single raster cell value [2] and the QgsRasterDataProvider.write method would let me write a raster without using GDAL.</p>
    </div>Radek <br><br><br clear="all">[1] <a href="http://gis.stackexchange.com/questions/181527/how-can-i-use-qgsrasterdataprovider-write-from-python-in-qgis">http://gis.stackexchange.com/questions/181527/how-can-i-use-qgsrasterdataprovider-write-from-python-in-qgis</a><br>[2] <a href="https://github.com/erpas/serval">https://github.com/erpas/serval</a><br></div>