[gdal-dev] Faster gdalinfo from COG

Vincent Sarago vincent.sarago at gmail.com
Wed Jan 8 09:27:56 PST 2020

Hi Jukka,
The time you are seeing is related to your configuration and not specifically to the file itself. 

If you set `GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR` in your env, you’ll see that gdalinfo will be much faster. 

$ time GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR gdalinfo /vsicurl/http://latuviitta.kapsi.fi/data/jarvi_dem/saimaa_dem.tif
GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR gdalinfo   0.05s user 0.04s system 6% cpu 1.341 total

$ time GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR gdalinfo /vsicurl/http://latuviitta.kapsi.fi/data/jarvi_dem/saimaa_dem.tif <http://latuviitta.kapsi.fi/data/jarvi_dem/saimaa_dem.tif>
gdalinfo /vsicurl/http://latuviitta.kapsi.fi/data/jarvi_dem/saimaa_dem.tif  0.12s user 0.23s system 2% cpu 11.719 total


> Le 8 janv. 2020 à 12:21, Rahkonen Jukka (MML) <jukka.rahkonen at maanmittauslaitos.fi> a écrit :
> Hi,
> Cloud optimized GeoTIFF is rather fast for almost anything else but not for checking what it is with gdalinfo. I wonder if we could have some “summary only” mode in gdalinfo that reads just what is known to be fast to read from the image metadata. What gdalinfo is actually doing when it spends five minutes before it prints info about http://latuviitta.kapsi.fi/data/jarvi_dem/saimaa_dem.tif <http://latuviitta.kapsi.fi/data/jarvi_dem/saimaa_dem.tif>? For me it seems that the whole report could be generated from either the baseline tiff tags or from the GeoTIFF and GDAL tags, even statistics which I added with gdal_edit.
> -Jukka Rahkonen-
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org>
> https://lists.osgeo.org/mailman/listinfo/gdal-dev <https://lists.osgeo.org/mailman/listinfo/gdal-dev>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200108/6aa25611/attachment-0001.html>

More information about the gdal-dev mailing list