Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gdaladdo slowness for large files #1442

Closed
Wardrop opened this issue Apr 15, 2019 · 2 comments
Closed

gdaladdo slowness for large files #1442

Wardrop opened this issue Apr 15, 2019 · 2 comments
Milestone

Comments

@Wardrop
Copy link

Wardrop commented Apr 15, 2019

Just carrying over this ticket from the old trac-based bug tracker: https://trac.osgeo.org/gdal/ticket/5067

Expected behavior and actual behavior.

gdaladdo becomes excruciatingly slow when working with larger datasets. Original ticket points at the dimensions being the main contributing metric, rather than file size. In my case, a 130,000 x 170,000 GeoTIFF was processed in under 12 hours with constant single-core CPU usage. On the other hand, a 519,398 x 915,156 GeoTIFF (same compression; roughly 4x larger file) went for 3 days and barely had made any progress at all. 5% progress at the most. Most of the time the CPU was sitting idle, but disk usage was constant.

Steps to reproduce the problem.

The following gdaladdo command was used:

gdaladdo --config COMPRESS_OVERVIEW JPEG --config JPEG_QUALITY_OVERVIEW 85 --config PHOTOMETRIC_OVERVIEW YCBCR --config BIGTIFF_OVERVIEW YES "D:\2015_25cm_mosaic_jpeg85.tif" 2 4 8 16 32 64

Adding '-ro' to the above to force generation of an external overview increases the speed by at least one order of magnitude. The original ticket indicates that this is specific to internal overviews.

Operating system

Windows 10 64-bit

GDAL version and provenance

GDAL 2.4.1

@palmerj
Copy link
Contributor

palmerj commented Apr 15, 2019

This is a workaround for this issue that make things much faster (as explain by Even in https://trac.osgeo.org/gdal/ticket/5067): https://gist.github.com/palmerj/2e4a46fbcf0c97212e6e77fced22e885 This script has been designed to create large Cloud Optimised Geotiffs with a mask

@matsamentet
Copy link

Adding an enthusiastic thumbs up for an optimization of GdalAddo. I create a lot of large raster GeoPackages, where external overviews are not possible, and so the workaround is not an option.

@rouault rouault closed this as completed in 60b3c52 May 9, 2019
rouault added a commit that referenced this issue May 9, 2019
GTiff: improve performance of internal overview creation (fixes #1442)
@rouault rouault added this to the 3.1.0 milestone Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants