formatting of BoundingBox coordinates (mapows.c)

Daniel Morissette dmorissette at DMSOLUTIONS.CA
Fri Nov 4 17:19:19 EST 2005


Frank Warmerdam wrote:
> 
> The downside to using %f is that we really need to provide explicit
> precision (ie. %.3f or %.15f).  Without knowing too much about the
> SRSes in question it is often hard to pick an optimal precision.  If
> we pick to much precision we end up introducing "noise" digits at
> the end beyond the double precision of the inputs that makes
> comparison of extents with other servers messy.  If we provide too
> little precision and the coordinate system ends up being geographic
> then we could easily be giving very poor bounds.
> 

There seems to be no easy solution to this as you explained. In other 
places we use %.15g, that's at least better than %f, perhaps we should 
use that there too?

Daniel
-- 
------------------------------------------------------------
  Daniel Morissette               dmorissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------



More information about the mapserver-dev mailing list