QGIS Null Coordinates – Resolving $x and $y Resulting in NULL Values for One Point Layer

coordinatesfields-attributesnullqgisxy

I created a point layer starting on lines (with revised geometries) and then tried to obtained the coordinates of several point layers created from the same procedure and also joined all the point layers to one only and tried the same.

To obtain the coordinates of every point on the layers I tried "add x/y fields to layer", "add geometry attributes" and used the field calculator to create two columns (float numbers with 8 digits precision and longitud 9) and then used the $x and $y functions. The columns are called Lon and Lat respectively.

The result is always the same, there are no errors reported during the process, but when I open the attribute table of the new layer, only some points got values for the X and Y field and most of them (in the same column) have NULL value.

I'm using the 3.16 Qgis desktop version in Ubuntu 18.04. I'm also adding a picture of the attribute table and result of the "add x/y fields to layer" result.

Anybody knows what could be causing this?

enter image description here

enter image description here

Best Answer

The problem with NULL values are related to missing geometry, here is the message:

enter image description here

Related Question