2

I'm trying to modify an attribute field in a shapefile, type double/real by hand.

The existing number, for example, is 100.01 or 123.45, etc. QGIS will not let me type in a number with more than one digit before the decimal place.

I can type multiple digits to the right of the decimal place, but only one to the left.

The current workaround is to copy all the values to a new field, edit those, and then copy them back with the field calculator ( QGIS 3.2.1 )

A possible clue is that the existing field that is troublesome to edit is type: double, type name: real.

The new field is type:

double, type name: double

Length is 12, and precision is 11. If precision is the number of decimal place to the right, this might partially explain the < 10 issue. But, numbers >= 10 can be stored in the field, I just can't type them by hand, which leads me to believe this is a limitation of qgis, and not the shapefile.

Edit: Tested with arcmap, no problem entering numbers >= 10, so this appears to be a qgis thing. Edited numbers save fine and are visible in qgis. Interestingly arcmap thinks the length and precision are 0 & 0.

  • 2
    Actually, the exact values of precision and width are likely critical to answering the question. Please Edit this question with the exact column definition – Vince Sep 6 '18 at 0:42
0

The length and precision parameters of a decimal field affect each other. If you really need 11 decimal places but your highest value is in the hundreds, you would need to enter a length of 14. Here's a visual example:

field definition table result

Here, I would not be able to enter a value in the thousands with the parameters I set for that field. If I had entered a length of 11, it would be possible. And yes, it is a QGIS thing, but I find it to work well to ensure consistent values.

0

I suggest you create a new field with type "Decimal Number" and set the precision to whatever you need. Use the calculator to copy our data from the old field to the new one then try editing manually again.

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.