[Proj] Numerical Precision in Proj, WKT, and everywhere

Gerald I. Evenden geraldi.evenden at gmail.com
Wed Mar 31 19:26:02 EST 2010


On Wednesday 31 March 2010 7:36:34 pm Craig Bruce wrote:
> I was reading the following web page and its discussion of numerical
> precision written by Frank Warmerdam:
>
> http://home.gdal.org/projects/opengis/wktproblems.html
>
> I agree with what he said, but printf's "%.16g" does have a problem which
> manifests itself frequently, such as in the "epsg" CRS definitions in
> proj-4.6.0, e.g.:
>
> # Anguilla 1957 / British West Indies Grid
> <2000> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000
> +y_0=0 +ellps=clrk80 +units=m +no_defs  <>

Prey tell, why is someone using %,16g to print out a numbet that is rarely, if 
ever, specified to more 4 to 6 digits? %g would be completely adequate and 
avoid the absurd gyration suggested in the original email.

Of course, the other question is why is the number, apparently from a data 
base, store in binary in the first place?

Sorry for the sarcasm but the nature of this non-problem overwhelms me.

-- 
The whole religious complexion of the modern world is due
to the absence from Jerusalem of a lunatic asylum.
-- Havelock Ellis (1859-1939) British psychologist


More information about the Proj mailing list