Changes between Initial Version and Version 1 of Ticket #3732


Ignore:
Timestamp:
Aug 24, 2010, 9:49:09 PM (14 years ago)
Author:
cdestigter
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3732

    • Property Type enhancementdefect
    • Property Summary Add a FLOAT_FORMAT creation option to ASCII Grid writerChange float format string for AAIGrid writer to %.20g
  • Ticket #3732 – Description

    initial v1  
    1 By default the AAIGrid float format string is "%6.20g"
     1The AAIGrid float format string is "%6.20g"
     2
     3Firstly, the 6 doesn't really add anything, and when writing small integers it causes them to be space-padded, which is a waste of bytes.
    24
    35At present AAIGrid supports "-co DECIMAL_PRECISION=10" which changes the formatstring to "%.10f".
    46
    5 That's a start, but we're finding it falls short. We want to be able to remove the extra spaces per pixel, while at the same time stripping unneccessary decimal components for ints.
     7This is a little inconsistent, and the %f causes integers to be written as "9.000000000" which is a horrible waste of bytes.
    68
    7 For maximum flexibility we'd like to do this:
    8 
    9 -co FLOAT_FORMAT=%.6g
    10 
    11 I'll attach a patch shortly that addresses this.
     9I'll attach a minimal patch shortly which fixes these.