[gdal-dev] Re: How to retain double precision in GDAL?

Chaitanya kumar CH chaitanya.ch at gmail.com
Sun Aug 8 23:44:28 EDT 2010


Ole,

This option is for the AAIGRID driver. So this option is valid any time the
format is handled.

In a python script you set the option you need to set this option during the
call to gdal.Open() to set a specific datatype.
Refer to
http://trac.osgeo.org/gdal/browser/trunk/autotest/gdrivers/aaigrid.py#L245and
http://trac.osgeo.org/gdal/browser/trunk/autotest/gdrivers/aaigrid.py#L247 .
Remember to set it to 'None'.

To set this option for gdal/ogr utilities use the option "--config" as
described in http://www.gdal.org/gdal_utilities.html.

Use the CPLSetConfigOption() function in C/C++ code.

On Mon, Aug 9, 2010 at 8:10 AM, Ole Nielsen <Ole.Nielsen at aifdr.org> wrote:

>
> Thanks for fixing the precision loss so quickly.
>
> "you now can set the configuration option AAIGRID_DATATYPE to Float64 to
> force Float64 being used to avoid the loss of precision."
>
> I am not exactly sure whether this option relates to the gdal_translate
> command line utility or the Python binding (ReadAsArray) - or both.
>
> Could you perhaps post the updated script that produced the double
> precision
> values correctly?
>
> Thanks
> Ole Nielsen
>
>
>
>
> -----
> Ole Nielsen
> Australia - Indonesia Facility for Disaster Reduction
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/gdal-dev-How-to-retain-double-precision-in-GDAL-tp5379507p5387617.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100809/59c0978a/attachment.html


More information about the gdal-dev mailing list