<div dir="ltr">As I iterate through a point vector layer I get each feature. Normally I would get access to the coordinate with <div>    pt = feature.geometry().asPoint()</div><div>Unfortunately, this is a QgsPointXY and not a QgsPoint and I need to have access to the Z attribute. There is no function to return a QgsPoint that includes the Z and M values. </div><div><br></div><div>If I do feature.geometry().get() there are member functions such as addZValue(), dropZValue (), but there is no getZValue(). </div><div><br></div><div>There is a function called vertexAt(QgsVertexId id) which returns a QgsPoint, but the documentation is very unclear on how to actually use this. What really is QgsVertexId and how should it be constructed? Alternatively there is vertices() or vertices_begin () which are iterators that potentially could be used.</div><div><br></div><div>This all seems awkward and not documented well. What is the best way to get a QgsPoint from a point feature which is coming from a processing script like this?</div><div><br></div><div>    iterator = source.getFeatures()</div><div>    for cnt, feature in enumerate(iterator):<br></div><div><br></div><div>Thanks,</div><div><br></div><div>Calvin</div></div>