<div dir="ltr"><div>Hi Andrea,</div><div>Funny (?). I had the same request: <a href="https://github.com/qgis/QGIS-Documentation/pull/6488">https://github.com/qgis/QGIS-Documentation/pull/6488</a></div><div><br></div><div>Regards,</div><div>Harrissou<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 11 févr. 2021 à 20:13, Andrea Giudiceandrea <<a href="mailto:andreaerdna@libero.it">andreaerdna@libero.it</a>> a écrit :<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 all,<br>
is it expected that QgsGeometry constGet() and constParts() in PyQGIS return<br>
modifiable objects?<br>
<br>
In the Python Console:<br>
<br>
>>> geom=QgsGeometry.fromWkt( 'Point(16 41)' )<br>
>>> geom_const=geom.constGet()<br>
>>> geom_const.transform(QgsCoordinateTransform(QgsCoordinateReferenceSystem("EPSG:4326"),<br>
>>> QgsCoordinateReferenceSystem("EPSG:25833"), QgsProject.instance()))<br>
<br>
>>> geom_const<br>
<QgsPoint: Point (584102.13444570498540998 4539238.58925933390855789)><br>
>>> geom<br>
<QgsGeometry: Point (584102.13444570498540998 4539238.58925933390855789)><br>
<br>
<br>
>>> geom=QgsGeometry.fromWkt( 'MultiPoint((16 41))' )<br>
>>> for part in geom.constParts():<br>
<br>
part.transform(QgsCoordinateTransform(QgsCoordinateReferenceSystem("EPSG:4326"),<br>
QgsCoordinateReferenceSystem("EPSG:25833"), QgsProject.instance()))<br>
<br>
>>> geom<br>
<QgsGeometry: MultiPoint ((584102.13444570498540998<br>
4539238.58925933390855789))><br>
<br>
<br>
Regards.<br>
<br>
Andrea Giudiceandrea<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html</a><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><br>
</blockquote></div>