Roger,<br><br>OGR doesn't support control of coordinate precision. You need to do this yourselves.<br>You can get the WKT of the geometry and and edit the string. If you are willing to recompile GDAL/OGR, you can modify the code that creates the WKT. Even wrote how to do this in this mailing list [1].<br>
<br>[1]: <a href="http://lists.osgeo.org/pipermail/gdal-dev/2011-April/028306.html">http://lists.osgeo.org/pipermail/gdal-dev/2011-April/028306.html</a><br><br><div class="gmail_quote">On Wed, Aug 17, 2011 at 5:21 AM, Roger André <span dir="ltr"><<a href="mailto:randre@gmail.com">randre@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi All,<div><br></div><div>I have an assignment that requires me to truncate the precision of all my polygon coordinates to 6 decimal places. Is there an easy way to do this while I have the feature opened with OGR and can access its ogr.Geometry directly? If not, can someone recommend a good way to iterate through each coordinate in a feature in such a way that I can treat it as a string and format it?</div>
<div><br></div><div>Thanks,</div><div><br></div><font color="#888888"><div>Roger</div>
</font><br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>
<br>+91-9494447584<br>17.2416N 80.1426E<br>