Opened 14 years ago

Last modified 10 years ago

#3732 closed defect

Change float format string for AAIGrid writer to %.20g — at Version 1

Reported by: cdestigter Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: 1.10.1
Severity: normal Keywords: asciigrid
Cc: Kyle Shannon

Description (last modified by cdestigter)

The AAIGrid float format string is "%6.20g"

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.

At present AAIGrid supports "-co DECIMAL_PRECISION=10" which changes the formatstring to "%.10f".

This is a little inconsistent, and the %f causes integers to be written as "9.000000000" which is a horrible waste of bytes.

I'll attach a minimal patch shortly which fixes these.

Change History (2)

comment:1 by cdestigter, 14 years ago

Description: modified (diff)
Summary: Add a FLOAT_FORMAT creation option to ASCII Grid writerChange float format string for AAIGrid writer to %.20g
Type: enhancementdefect

by cdestigter, 14 years ago

Note: See TracTickets for help on using tickets.