[Mapserver-dev] Floating point precision problem in the WMS module

Jean-Henry Berevoescu bjh at globexplorer.com
Tue May 25 16:26:34 EDT 2004


Daniel Morissette wrote:

> Ned Harding wrote:
>
>> I have not looked at this code in particular, but the problem is 
>> probably on
>> the output of the #, not the input. Most implementations of sprintf and
>> related will only show 6 or so decimal places unless you specifically
>> request more.
>>
>
> Agreed. Plus I just added to the bug a small test program that 
> demonstrates that atof() maintains the full precision of a double, so 
> the problem has to be somewhere else.
>
Tested this and you are right. The problem is indeed in the way the URL 
string
is built for the WMS Layer access and not as I said, in the parsing (I 
actually
added logging in the parsing that was similar to the way the URL was 
built, therefore
the confusion).
The bug still is, as you note, in the WMS Layer URL construction and for 
now I have
modified my MMS code to do "%.12lf" instead of just "%f".

Jean




More information about the mapserver-dev mailing list