<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 10, 2015, at 3:06 PM, Even Rouault <<a href="mailto:even.rouault@spatialys.com" class="">even.rouault@spatialys.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">Le samedi 10 octobre 2015 13:45:05, Dimitrianos Savva a écrit :<br class=""><blockquote type="cite" class="">Hi all,<br class=""><br class="">Recently I noticed that the ExportToWKT<br class=""><<a href="http://gdal.org/java/org/gdal/ogr/Geometry.html#ExportToWkt()" class="">http://gdal.org/java/org/gdal/ogr/Geometry.html#ExportToWkt()</a>> function<br class="">of a Geometry object that has been read from a Shapefile, generates the<br class="">well known text representation without any compromise on the precision of<br class="">the coordinates values.<br class=""><br class="">I wonder how these coordinates are represented in memory. A double<br class="">precision floating type is not enough to represent some coordinates.<br class=""><br class="">For example the geometry POINT (4799826.09861662145704<br class="">2773995.445373429451138) cannot be represented by two double types. But<br class="">still the ExportToWKT function produces the correct result with full<br class="">precision for the values.<br class=""></blockquote><br class="">Dimitrianos,<br class=""><br class="">The implementation of ExportToWKT() in GDAL uses 15 decimal figures ("%.15f" <br class="">printf formatting) whatever the source precision was, and as you point, <br class="">whatever the intrinsic precision of the double value is.<br class=""><br class="">Even<br class=""><br class="">-- <br class="">Spatialys - Geospatial professional services<br class=""><a href="http://www.spatialys.com" class="">http://www.spatialys.com</a><br class=""></div></blockquote><br class=""></div><div>Thanks you for the quick answer!</div><div>Actually I was confused at some point, because some geometries had the exact precision as in the Shapefile,</div><div>and some other not. </div><div><br class=""></div><div>Thanks again,</div><div>Dimitrianos</div><br class=""></body></html>