[gdal-dev] GDAL precision for Geometry object

Dimitrianos Savva dimis at di.uoa.gr
Sat Oct 10 04:45:05 PDT 2015


Hi all,

Recently I noticed that the ExportToWKT <http://gdal.org/java/org/gdal/ogr/Geometry.html#ExportToWkt()> function of a Geometry object that has been read from a Shapefile, generates the well known text representation without any compromise on the precision of the coordinates values.

I wonder how these coordinates are represented in memory. A double precision floating type is not enough to represent some coordinates.

For example the geometry POINT (4799826.09861662145704 2773995.445373429451138) cannot be represented by two double types. But still the ExportToWKT function produces the correct result with full precision for the values.

Thnks,
Dimis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20151010/7b9ee495/attachment.html>


More information about the gdal-dev mailing list