2010/7/22 easyl <[email protected]>

>
> 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)?
>
>
I suspect this is an issue with OGRFeature::GetFieldAsString when formatting
the string representation of a double value.



> 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.
>
>
To select all attributes you may use an asterisk '*' however it would
include the 'DEPTH ' field as well.



> btw, CAST feature is available from GDAL1.6+.
> GDAL/OGR from FWTools-2.0.6 will not work.
>
>
I'm not sure about the versions included in FWTools-2.0.6 you may however
use the proper versions of the packages from http://vbkto.dyndns.org/sdk/

Best regards,

Tamas
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to