[gdal-dev] Creating Geotiff is slow

Thomas Coquet tcoquet at gmail.com
Tue Jun 16 08:53:05 PDT 2020


Thank you Even for your prompt answer, -co NBITS=16 solved my problem!

Thomas

Le mar. 16 juin 2020 à 17:37, Even Rouault <even.rouault at spatialys.com> a
écrit :

> > I am puzzled by this behavior... Is there something wrong with my GDAL
>
> > settings ?
>
> > Is there a way to speed up the GeoTIFF creation ? Why is it faster using
>
> > python ?
>
>
>
> There might be several factors:
>
>
>
> - if with rasterio you read completely the image into memory, and then
> write it, parallel decompression is perhaps more effective. gdal_translate
> (actually the mechanics behind it) tries to use smaller read & write
> windows by default. You could try to set the GDAL_SWATH_SIZE configuration
> option to 250000000 so that the full band is read at once.
>
>
>
> - but I suspect the reason might be due to the Sentinel2 band reporting 15
> bits, and gdal_translate instructing the GTiff driver to use that setting,
> whereas I'm not sure if rasterio does the same by default. Writing 15 bits
> / pixel isn't a super fast code path in the GeoTIFF driver. You could try
> adding -co NBITS=16
>
>
>
> Even
>
>
>
>
>
> --
>
> Spatialys - Geospatial professional services
>
> http://www.spatialys.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200616/0a435a99/attachment.html>


More information about the gdal-dev mailing list