[gdal-dev] gdal2tiles vs COG

Richard Greenwood richard.greenwood at gmail.com
Tue Jul 5 06:27:56 PDT 2022


On Tue, Jul 5, 2022 at 1:30 AM Javier Jimenez Shaw <j1 at jimenezshaw.com>
wrote:

> Hi
>
> Do you know if there is any performance comparison between gdal2tiles and
> COG?
>
> To display our geotiffs we are currently running gdal2tiles and storing
> the (gazillion) tiles in Amazon S3. Then a webpage with openlayers is
> showing them in WebMercator.
> We are considering moving to make a COG file with the option
> TILING_SCHEME=GoogleMapsCompatible and use also openlayers to read it (from
> the same S3 server). However, our first tests are not running very fast
> displaying the map in the browser.
>
> I do not know if anybody else had studied it, and if there is any trick to
> make it faster.
>

Are you rendering the images in OpenLayers? And are you using the new-ish
GeoTiff format for the COGs? If so, I think the performance issue is that
OpenLayers has to read a lot of index data from the COG before it can make
a http range request. With tiles, the schema is already defined whereas
with a COG the app has to query the COG to get the schema before it can
request the portions that it needs. I found that after the initial requests
were completed that performance was fairly comparable.


> PS. I cannot use JPEG compression (with alpha) with openlayers, but that
> is another problem... or maybe not.
>

One kludge/work-around is to use a vector layer as a mask, but this
discussion probably doesn't belong on the GDAL list.


> Thanks,
> Javier.
> .___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__
> Entre dos pensamientos racionales
> hay infinitos pensamientos irracionales.
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>


-- 
Richard W. Greenwood
www.greenwoodmap.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220705/d8c03d36/attachment.htm>


More information about the gdal-dev mailing list