[gdal-dev] Geometry.ExportToWKT : numeric precision ?

Jay Jennings Jennings.Jay at geoeye.com
Wed Apr 6 16:51:17 EDT 2011


Hello list,
Does anyone know of a way to set the numeric precision on a Geometry.ExportToWKT() call ?   For the SRS, we are using EPSG:4326 (WGS-84) so the multipolygon coordinates are in latitude/longitude, and most of the coordinate strings seem to carry 15 digits past the decimal point !!   For our needs, 7 or 8 digits would be sufficient, so this seems wasteful, especially when the string is stored in a database.  I examined the OGR documentation but I don't see any variation of ExportToWKT nor any other means of setting the numeric precision.

I estimate using 7 digits of precision instead of 15 could reduce total storage by about 40%.  I realize I could post-process the string produced by ExportToWKT() to reduce all coordinates to the desired precision.  But did I miss anything in OGR capabilities ?

BTW we are using GDAL/OGR 1.8.0 with C# bindings.

Jay Jennings
GeoEye, Inc.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110406/c0bef52f/attachment.html


More information about the gdal-dev mailing list