> 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
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to