[gdal-dev] gdal_translate is slow

Sean Gillies sean at mapbox.com
Wed Sep 4 07:50:09 PDT 2019


Hi Denis,

rio-convert lacks some of the features of gdal_translate (advanced metadata
translation, statistics, &c) and it may be that the cost of those features
is being especially felt in the GRIB case. In fact, the core of
gdal_translate has some GRIB-specific code that rasterio does not use:
https://github.com/OSGeo/gdal/blob/master/gdal/apps/gdal_translate_lib.cpp#L1763-L1782
.

Hope this helps!

On Wed, Sep 4, 2019 at 6:25 AM Denis Rykov <rykovd at gmail.com> wrote:

> Why gdal_translate so slow compared to rio translate from rasterio?
>
> rio convert:
>
> $ time rio convert download.grib download.tif
> Warning: Inside GRIB2Inventory, Message # 15
> ERROR: Ran out of file reading SECT0
> Warning: Inside GRIB2Inventory, Message # 15
> ERROR: Ran out of file reading SECT0
> rio convert download.grib download.tif  15.79s user 2.05s system 72% cpu
> 24.627 total
>
>
>
> gdal_translate:
>
> $ time gdal_translate download.grib download.tif
> Warning: Inside GRIB2Inventory, Message # 15
> ERROR: Ran out of file reading SECT0
> Input file size is 3600, 1801
> 0...10...20...30...40...50...60...70...80...90...100 - done.
> gdal_translate download.grib download.tif  261.99s user 18.57s system 98%
> cpu 4:45.62 total
>
>
-- 
Sean Gillies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190904/f13e094d/attachment.html>


More information about the gdal-dev mailing list