[gdal-dev] How to change displayed decimal places of double type in the method: OGRFeature::SetField
taibc
taibc_coltech at yahoo.com
Tue Jul 24 21:26:17 PDT 2012
Hi friends,
I used the method: OGRFeature:SetField(int i, double dfValue) to set field
values of a shapefile file (.dbf file).
I changed dfValue format to display 2 digits in decimal places. But, when I
used the Excel to see values, it showed an unexpected result.
For example:
First, dfValue = 2688.74923
After changing format (by using code), dfValue = 2688.75
But, when I saw values in the excel, it showed: 2688,750000000000000 (not
2688.75)
How can I fix it (don't need change format settings in excel)?
Thanks and regards,
Tai
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-change-displayed-decimal-places-of-double-type-in-the-method-OGRFeature-SetField-tp4990648.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
More information about the gdal-dev
mailing list