[gdal-dev] Changing precision of coordinates in Python OGR API
Chaitanya kumar CH
chaitanya.ch at gmail.com
Wed Aug 17 01:36:16 EDT 2011
OGR doesn't support control of coordinate precision. You need to do this
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 .
On Wed, Aug 17, 2011 at 5:21 AM, Roger André <randre at gmail.com> wrote:
> Hi All,
> 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?
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
Chaitanya kumar CH.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev