<div dir="ltr"><div dir="ltr">Hi Matteo, <div><br></div><div>yes, it's possible to write custom Processing scripts for editing layers in-place.</div><div><br></div><div>Here you can find an example (buffer): </div><div><a href="https://github.com/gacarrillor/QGIS-Resources/blob/master/collections/processing_scripts/processing/processing_script_edit_in_place.py">https://github.com/gacarrillor/QGIS-Resources/blob/master/collections/processing_scripts/processing/processing_script_edit_in_place.py</a><br></div><div><br></div><div>From the example we can see: </div><div><ul><li>We need to set the QgsProcessingAlgorithm.FlagSupportsInPlaceEdits flag for our algorithm.</li><li>It's not required that our algorithm inherits from <span style="color:rgb(0,0,0)">QgsProcessingFeatureBasedAlgor</span><span style="color:rgb(0,0,0)">ithm </span>for it to support edit-in-place[*].</li><li>The supportInPlaceEdit() method allows us to specify for which layers our algorithm can be offered as edit-in-place. </li></ul></div><div>Regards,</div><div><br></div><div>Germán </div><div>--------------------</div><div>[*] As a demo, the buffer example is OK. However, since each feature generates a new feature without needing other source features, the buffer example could also be written as a <span style="color:rgb(0,0,0)">QgsProcessingFeatureBasedAlgor</span><span style="color:rgb(0,0,0)">ithm. :) </span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mar., 14 abr. 2020 a las 3:22, matteo (<<a href="mailto:matteo.ghetta@gmail.com" target="_blank">matteo.ghetta@gmail.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Arnaud,<br>
<br>
I explored the QgsProcessingFeatureBasedAlgorithm but unfortunately is<br>
not the case of what I'm looking for. From what I understood<br>
QgsProcessingFeatureBasedAlgorithm is the class to use when the<br>
algorithm performs "feature-by-feature" operations like buffers.<br>
<br>
In my case I would like to "change" the geometry of the input layer<br>
(union and dissolve).<br>
<br>
Cheers and thanks for the input anyway!<br>
<br>
Matteo<br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>-----------<br></div><div>   |\__  <br>(:>__)(<br>   |/    <br><a href="http://geotux.tuxfamily.org/" target="_blank">Soluciones Geoinformáticas Libres</a>                            <br><a href="http://twitter.com/GeoTux2" target="_blank">https://twitter.com/GeoTux2</a></div><div><br></div><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><a href="http://qgisusers.co" target="_blank">Grupo de Usuarios QGIS Colombia</a></div><div><div><a href="http://qgisusers.co" target="_blank"></a></div><div><a href="https://twitter.com/qgiscolombia" target="_blank">https://twitter.com/qgiscolombia</a></div></div></div></div></div></div></div><div><br></div></div></div></div></div></div></div>