orbisgis / cts

Projection library in Java
GNU Lesser General Public License v3.0
50 stars 16 forks source link

Parameter precision in WKT writer #87

Closed mukoki closed 7 years ago

mukoki commented 7 years ago

Currently, WKT Writer retains a maximum of 11 decimals when it writes parameter values. Although 11 decimal is generally a good precision for parameters either in meters or in degrees, I think that it is not good to change the precision at this stage. I tried to write a method which solve some rounding problems when values like 500000.000003 or 14.9999999998 are found in parameters, without loosing precision, but I think the simplest way would be to write doubles as is, without rounding and without special processing. What do you think and why did you choose to round to 1E-11 ?

ebocher commented 7 years ago

I'm agree to keep the precision as is.