[gdal-dev] Too much precision in WKT

Brent Fraser bfraser at geoanalytic.com
Wed Jun 3 10:14:48 EDT 2009


Frank,

  I'm all for that approach.  The option should be added to ogrinfo as well since it can dump out WKT when incanted properly (I had started to sed/grep/awk its output, then I found that ogr2ogr -f CSV would dump WKT geometry).

Many Thanks,
Brent Fraser

Frank Warmerdam wrote:
> 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,


More information about the gdal-dev mailing list