Changes between Initial Version and Version 1 of Ticket #3732
- Timestamp:
- Aug 24, 2010, 9:49:09 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #3732
- Property Type enhancement → defect
- Property Summary Add a FLOAT_FORMAT creation option to ASCII Grid writer → Change float format string for AAIGrid writer to %.20g
-
Ticket #3732 – Description
initial v1 1 By default the AAIGrid float format string is "%6.20g" 1 The AAIGrid float format string is "%6.20g" 2 3 Firstly, 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. 2 4 3 5 At present AAIGrid supports "-co DECIMAL_PRECISION=10" which changes the formatstring to "%.10f". 4 6 5 Th at'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.7 This is a little inconsistent, and the %f causes integers to be written as "9.000000000" which is a horrible waste of bytes. 6 8 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. 9 I'll attach a minimal patch shortly which fixes these.