2

I am working in QGIS 2.18.0 version.

My analysis involves using vector filed calculator for some operation. This new filed I am creating with an output filed type as Decimal number(integer). I wrote expression and it works fine but when I save it the field type changes to Whole number.

Screen shot of attribute table

In above image SlopeRati was Decimal type and I created one more filed SlopeRati1 and stored orginal decimal values as STRING. After saving this later doest not change but earlier filed becomes Whole number.

  • Welcome to GIS:SE @PulkitVelani! When you use decimal numbers, you can specify the precision of how many positions after the decimal point you want to include in your field. So just make sure it's not 0. – Joseph Nov 29 '16 at 10:37
3

Decimal number(integer)

Is a whole number.

You want to use:

Decimal number (real)

Also as mentioned by Joseph in the comments make sure you have a precision set. So precision is how many decimal places get saves and width is the overall number if digits stored both before and after the decimal place.

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.