-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
field calculator: if you choose 'double' as fieldtype, the precision is NOT set to >0 #19632
Comments
Author Name: Matthias Kuhn (@m-kuhn) Just to be sure I understand correct. This feature request is:
|
Author Name: Richard Duivenvoorde (@rduivenvoorde) I think this is actually the same one as: #17777 |
Author Name: Richard Duivenvoorde (@rduivenvoorde) @mkuhn: Change the default precision for double to 5 instead of 0 So the Output field width should change to sensible defaults when you change the type. as you see in #17777 also it is a caveat when you do not look at the precision... Now if you change from double to int, it sets the precision to 0, but the other way around it does NOT set it back or to an other sensible value for double. |
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Jürgen Fischer (@jef-n)
|
Seems fixed in master, when I choose double type precision is set to 3. |
See also #16581 |
Already fixed. |
Author Name: Richard Duivenvoorde (@rduivenvoorde)
Original Redmine Issue: 11338
Redmine category:unknown
After a question on IRC of somebody who ended up with area's of 0
Load the shp from test.zip (epsg:28992)
Make layer editable
Open Field Calculator
Tick 'create a new field' and fieldname 'area' and fieldtype double (but do not touch the precision which in my case is 0 then)
Now create the column with value $area
then the area looks ok
but after saving all numbers are/look integers....
REMARK: changed from bug to feature request.
After some testing it appeared that the precision in the dialog was on 0 (zero)
so the actual were doubles, but without precision (25.1233 became 25).
So feature request: IF the user chooses 'double' as fieldtype and the precision = zero,
then either let it know (because a double with zero precision is not a double) and warn the user,
OR set the precision on 5 or so
also it's not fully clear if the 'precision' includes the output fieldwidth or not,
from IRC: "i set the precision to 10, saves 8, i set to 11 saves with 9 precision"
The text was updated successfully, but these errors were encountered: