I have been adding points to a vector layer and I want to define their value in a specific column. When I try to edit the values, that are in decimal numbers, it only allows me to type integers.

How do I edit points in my attribute table in decimal numbers?

This is before(Z_COORDS) and after(ZCOORD) I tried to edit the column. enter image description here

  • 1
    What is the problematic field definition? – JGH Jun 7 '17 at 14:28
  • Field definition? Sorry, I am new to QGIS. – Gisnoob123 Jun 7 '17 at 14:31
  • @JGH open up the layer properties of the mower2shapefile layer, check the FIELDS section, and let us know what the data type of the ZCOORD field is... it might be a SMALLINT, which doesn't store decimals... – DPSSpatial Jun 7 '17 at 14:33
  • @JGH Under "Type" it says: qlonglong. And type name: Integer64. – Gisnoob123 Jun 7 '17 at 14:36

The field you are editing must accept decimals. You can add a new field of type real. The length is the total number of numbers and the precision is the number of numbers after the decimal. So length 2 precision 1 will let you save 0.0, 9.9 but not 0.01 nor 10

enter image description here

  • The problem is that the field did accept decimals until i edited it. But now I haven't been able to recreate my problem, your solution works! – Gisnoob123 Jun 8 '17 at 6:21

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.