Hello everyone,
I am currently using Lizmap Web Client (LWC) to display projects that can contain tens of orthomosaic raster files (.tif), and I am studying different approaches to optimize navigation and rendering performance on the web.
At the moment, I am mainly working with Cloud Optimized GeoTIFFs (COGs) and experimenting with a VRT that references multiple COG files. From a data management perspective, this approach is quite attractive:
However, despite these advantages, I am still experiencing noticeable latency in Lizmap when navigating (pan/zoom), especially when many orthomosaics are involved. The VRT helps, but rendering delays remain significant in real usage.
To better understand the limitations, I ran a comparison test outside of Lizmap:
-
a simple OpenLayers map (no LWC),
-
using WebGLTile with a GeoTIFF source,
-
accessing the same COG files over HTTP.
In this setup, I observed much better navigation performance than with the VRT-based approach. Since version 3.9.4 of LWC, OpenLayers WebGLTile layer & GeoTiff source have been added to the build, but GeoTiff source URL needs to point directly to the raster file.
So I am wondering:
Any feedback, experience, or pointers would be greatly appreciated.
Thanks in advance!
NB: I use a specific tree structure for each project, and each one is independent of the others
{project_name}
→ .qgs
→ .qgs.cfg
→ dir1/ortho1.tif
→ dir2/ortho2.tif
→ …
as .tiff is/could be a container, what is the file format of your internal tiles in the tiff? If you use .jpeg and in the layer options of that layer set the format to jpeg as well, it is pretty fast for me (IF you do not activate the map option “load layers as single WMS”)
I have a handy script to convert folders of raw tiff files into COG (cloud optimized geotiffs). I can share that if you like, but basically this command does the magic:
C:\OSGeo4W\bin\gdal_translate.exe Input_VRT.vrt Output_raster.tif -a_srs EPSG:25832 -of COG -co BLOCKSIZE=512 -co COMPRESS=JPEG -co QUALITY=75 -co BIGTIFF=YES -co NUM_THREADS=ALL_CPUS -co OVERVIEW_RESAMPLING=AVERAGE -co OVERVIEW_COUNT=12
Thank you for your explanations and for sharing the GDAL script, it’s very helpful! 
Indeed, I was still unsure about using a VRT, especially regarding the setup of overviews, which are necessary to properly integrate the layer in QGIS and Lizmap.
Switching to a single COG with internal JPEG tiling seems very interesting, both in terms of storage and navigation on the web map.
I do have one question: when you use this format (COG with JPEG tiles), what are the typical response times for each GetMap request?
Hi Raphaël,
We have experiences COG with QGIS Server / Lizmap and directly in Lizmap.
In a QGIS Project, we recommend to produce COGs with internal pyramid for a max size of 350 Go. Then you put directly the COGs in a layer group in the QGIS Project and select group as layer in lizmap plugin for the group. A QGIS layer group performs better than the VRT.
1 Like
Information about QGIS and COG´s
We at the QGIS.DE association have commissioned Even Rouault (Spatialys) to extend QGIS with additional functions for creating Cloud Optimized GeoTIFF (COG) files and related improvements in GDAL (https://gdal.org).
Technical details
•
Enhance the GDAL COG driver to support the “Create()” API, by creating transparently a temporary GeoTIFF file, and at close time converting it automatically to a COG.
•
Enhance QgsRasterDataProvider/QgsRasterFileWriter classes and their users within QGIS to offer smooth progression report when creating COG (to account for the 2 phases: temporary GeoTIFF file creation and then conversion to COG)
•
Modify the UI and underlying logic when saving a raster file for it to not only take into account the file extension to determine the GDAL driver (since .tif can be regular GeoTIFF or COG)
•
Enhance the raster layer properties dialog to mention when a file is a COG
•
Enhance the “gdal dataset identify” tool of GDAL to mention when a file is a COG and add a QGIS “GDAL / Miscellaneous / Dataset identification” tool that takes as input a directory and reports which datasets are detected and their format (with COG mention when appropriate).
1 Like