Re: [gdal-dev] Too much precision in WKT

2009-06-03 Thread Brent Fraser
Even, I'll likely do the hack for now. I need to write an easy-to-use app that spits out the first and last point coordinates of the linestrings as well as the linestrings in WKT for eventual loading into a database, so I might as well hard code the precision for now. Personally, I think so

Re: [gdal-dev] Too much precision in WKT

2009-06-03 Thread Brent Fraser
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 Fras

Re: [gdal-dev] Too much precision in WKT

2009-06-03 Thread Brent Fraser
Peter, I want to round the coordinates of the vertices of linestrings represented as WKT, not the projection parameters. My problem is that databases have different field types for strings depending on their expected length (MS Access TEXT vs MEMO for example, and I'm still trying to find in

Re: [gdal-dev] Too much precision in WKT

2009-06-02 Thread Even Rouault
Brent, no, there's currently no way to limit the precision. By looking at your example, it seems that the extra figures are significant (but perhaps not for your use case). You'd get 01 or 99 at the end of the numbers if they were not significant So there's no way OGR can guess that yo

Re: [gdal-dev] Too much precision in WKT

2009-06-02 Thread Frank Warmerdam
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.1473042

[gdal-dev] Too much precision in WKT

2009-06-02 Thread Brent Fraser
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 ther