I am trying to extract the z coordinate value from the derived attributes, similar to How to re-calculate area, perim, p2a,width and length in QGIS? but I cannot see a dedicated operator for finding the z coordinate like when trying to find area within the field calculator.

I have tried extraction of geometry tools > extract nodes & export/add geometry columns Screen shot of the attributes, I want Closest vertex Z to be a new column

  • Have you tried using the expression z($geometry)? – Joseph Nov 7 '17 at 12:05
  • Yes it only returns Null from the vector layer, after extracting the nodes the Z coordinate is lost and I am only left with X & Y – nashm999 Nov 7 '17 at 12:15
  • I have a similar problem. To get Z coordinate from polygons you need to tell what is the vertice you want Z. z(point_n($geometry ,1)) The problem while calculating Z coordinate from polygons is that Z returned is an integer. I need Z real, i´ve tryed a lot of other ways inside calculator and keep getting an integer. – Bruno ReZende Jan 29 at 18:33
  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review – xunilk Jan 29 at 18:56

You could try How to „extract“ z-values ? to open the attribute-table, go directly into the field-calculator. Within the geometry-functions you will find z

Just calculate z on the geometry: z ($geometry)

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.