Hi,<br><br>I am having a problem that I am hoping someone can help me with.  I have a piece of code that iterates through a feature class and pulls out the x and y coordinates from the geometry.  The z values are stored in the attribute table and I would also like to pull that value for each feature.  I have looked at Tutorial 6, but it looks like the classes have changed since it was written, I think.  I can see that feature.attributeMap() returns a dictionary of Key-Value pairs (I think) but I can&#39;t figure out how to get the &quot;Elevation&quot; field attribute value from that.  Here is the piece of code:<br>
<br>
<meta name="qrichtext" content="1"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style="margin: 0px; text-indent: 0px;">    while (mypVectorLayer-&gt;nextFeature(currentFeature))</p>
<p style="margin: 0px; text-indent: 0px;">    {</p>
<p style="margin: 0px; text-indent: 0px;">        //get geometry of the feature</p>
<p style="margin: 0px; text-indent: 0px;">        QgsGeometry* currentGeometry = currentFeature.geometry();</p>
<p style="margin: 0px; text-indent: 0px;">        QgsPoint currentPoint = currentGeometry-&gt;asPoint();</p><p style="margin: 0px; text-indent: 0px;"><br></p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">        //get the attributes of this feature</p>
<p style="margin: 0px; text-indent: 0px;">        const QgsAttributeMap&amp; myAttributes = currentFeature.attributeMap();</p><p style="margin: 0px; text-indent: 0px;"><br></p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">        //get the value from the &quot;Elevation&quot; field</p>
<p style="margin: 0px; text-indent: 0px;">        double zval = //value from field</p><p style="margin: 0px; text-indent: 0px;"> </p><p style="margin: 0px; text-indent: 0px;">        //add point coordinates to point and add point to dt<br>
</p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">        Point pt = Point(currentPoint.x(), currentPoint.y(), zval);</p>
<p style="margin: 0px; text-indent: 0px;">        dt.insert(pt);</p>
<p style="margin: 0px; text-indent: 0px;">        //delete currentFeature;</p>
<p style="margin: 0px; text-indent: 0px;">    }</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">Thanks,</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">
Matt<br></p><br>