[gdal-dev] Re: determine real number precision with ogr2ogr

easyl thlin.box at gmail.com
Thu Jul 22 04:24:41 EDT 2010


thanks for all your suggestions!

Using 'cast' sql option with ogr2ogr is interesting.
i.e. "SELECT CAST(DEPTH AS numeric(8,1)) from SOUNDG"
But I still have two questions.

1. now I have all real number with 1 digit precision. The values look like
1.2, 3.2, 2.0, 1.0.....
    Actually it is already good enough, but having "1.0" instead of just "1"
is still a little bit annoying.
    is that a OGR's issue (for evaluation and interpretation of numbers)? 

2. is there any quick way to select all other attributes (and cast only one
of them)?
    writing "SELECT attrib1, attrib2, attrib3, .... attribN, CAST(DEPTH AS
numeric(8,1)) from SOUNDG" is a little bit tedious.

btw, CAST feature is available from GDAL1.6+. 
GDAL/OGR from FWTools-2.0.6 will not work.


Thanks~

-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/determine-real-number-precision-with-ogr2ogr-tp5321136p5324455.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list