[gdal-dev] AAIGrid decimal precision

Volker Wichmann Volker.Wichmann at uibk.ac.at
Wed Jun 18 05:03:08 EDT 2008


Hi,

I have the following problem: the format of my data is originally 
arc/info ascii with two decimals (e.g. 1002.35). For processing, I need 
to use/convert to GeoTiff (Float32). And in the end, I use 
gdal_translate to write the processed data again as arc/info ascii. But 
now there are over 10 decimals written (e.g. 2003.73324423545) which 
causes the file to take about twice the size of the original raster.
so my question is actually if there is any control on the decimal 
precision written to ascii files? I see that the AAIGrid driver uses " 
%6.20g" for printing, so I could patch this. But it would be nicer to 
have a feature like a driver creation option to specify the number of 
decimals desired.

any help is appreciated,
thanks,
Volker



More information about the gdal-dev mailing list