I have imported contour lines from AutoCAD DXF file. I've 3D geometry. Í would like to add a new column to the attribute table of the contour lines. In th field calculator I user the following expression:

z(point_n($geometry, 1))

enter image description here The values in the new fields are -2,147,483,648, but if I click in a field I get NULL. enter image description here If I use the x or y function I get the correct x or y coordinate.


The third dimension was lost when I export the loaded polylines to ESRI shape file. After adding z dimension to the export the formula in field calculator works.

enter image description here

| improve this answer | |

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.