<br><br><div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup { position:absolute; z-index:9999; padding: 0px 0px; margin-left: 0px; margin-top: 0px; width: 240px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 13px;}</style><div class="gmail_quote">
2010/7/22 easyl <span dir="ltr"><<a href="mailto:thlin.box@gmail.com">thlin.box@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
thanks for all your suggestions!<br>
<br>
Using 'cast' sql option with ogr2ogr is interesting.<br>
i.e. "SELECT CAST(DEPTH AS numeric(8,1)) from SOUNDG"<br>
But I still have two questions.<br>
<br>
1. now I have all real number with 1 digit precision. The values look like<br>
1.2, 3.2, 2.0, 1.0.....<br>
Actually it is already good enough, but having "1.0" instead of just "1"<br>
is still a little bit annoying.<br>
is that a OGR's issue (for evaluation and interpretation of numbers)?<br>
<br></blockquote><div><br>I suspect this is an issue with OGRFeature::GetFieldAsString when formatting the string representation of a double value.<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2. is there any quick way to select all other attributes (and cast only one<br>
of them)?<br>
writing "SELECT attrib1, attrib2, attrib3, .... attribN, CAST(DEPTH AS<br>
numeric(8,1)) from SOUNDG" is a little bit tedious.<br>
<br></blockquote><div><br>To select all attributes you may use an asterisk '*' however it would include the 'DEPTH ' field as well.<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
btw, CAST feature is available from GDAL1.6+.<br>
GDAL/OGR from FWTools-2.0.6 will not work.<br>
<br></blockquote><div><br>I'm not sure about the versions included in FWTools-2.0.6 you may however use the proper versions of the packages from <a href="http://vbkto.dyndns.org/sdk/">http://vbkto.dyndns.org/sdk/</a><br>
<br>Best regards,<br><br>Tamas<br> <br></div></div><br>