[gdal-dev] Too much precision in WKT

Frank Warmerdam warmerdam at pobox.com
Tue Jun 2 14:51:30 EDT 2009


Brent Fraser wrote:
> I've been experimenting with v1.6.0 ogr2ogr:
> 
>    ogr2ogr -f csv test_dir test_in.shp -nln test_out -lco GEOMETRY=AS_WKT
> 
> The precision of the coordinates in the WKT seems to be overkill, eg:
>    "LINESTRING (-115.11433812265155 
> 53.146791166875367,-115.12192424362472 53.147304268559473,
> 
> Is there any way to limit the precision?

Brent,

This question has come up a few times in the context of different text
oriented drivers.  I'm wondering if we should add an option to ogr2ogr
(and a method on OGRGeometry) to reduce coordinate precision to a specified
amount.  I think I prefer this approach to the alternative of adding creation
options or configuration variables to each driver text driver.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list