> On Oct 10, 2015, at 3:06 PM, Even Rouault <even.roua...@spatialys.com> wrote:
> 
> Le samedi 10 octobre 2015 13:45:05, Dimitrianos Savva a écrit :
>> 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.
> 
> Dimitrianos,
> 
> The implementation of ExportToWKT() in GDAL uses 15 decimal figures ("%.15f" 
> printf formatting) whatever the source precision was, and as you point, 
> whatever the intrinsic precision of the double value is.
> 
> Even
> 
> -- 
> Spatialys - Geospatial professional services
> http://www.spatialys.com <http://www.spatialys.com/>

Thanks you for the quick answer!
Actually I was confused at some point, because some geometries had the exact 
precision as in the Shapefile,
and some other not. 

Thanks again,
Dimitrianos

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to