[gdal-dev] How to change displayed decimal places of double type in the method: OGRFeature::SetField

2012-07-24 Thread taibc
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 =

Re: [gdal-dev] How to change displayed decimal places of double type in the method: OGRFeature::SetField

2012-07-24 Thread Chaitanya kumar CH
Tai, DBF formats allows specifying the precision of decimal values. Check the field definition of the .dbf file using ogrinfo. If it shows a precision of 2, you did all you can with OGR. Excel, on the other hand, may have different rules. There is not much that can be done with .dbf files to