Skip to main content

How to view a virtual GeoTIFF in QGIS

QGIS with Virtual Geotiff Loaded

Configure QGIS

In the QGIS preferences (menu -> QGIS -> Preferences) in the "System" tab set the following into the Environment Variables:

VSI_CACHE=TRUE
VSI_CACHE_SIZE=500000000
GDAL_HTTP_VERSION=2
GDAL_HTTP_MULTIPLEX=YES
GDAL_HTTP_MULTIRANGE=YES
GDAL_HTTP_MERGE_CONSECUTIVE_RANGES=NO
CPL_LOG=/tmp/gdal_log.txt
CPL_LOG_ERRORS=ON

Setting QGIS environment vars

Open the image in QGIS

Use the "Data Source Manager" to open a virtual GeoTIFF image as a Raster data source.

  1. Select "menu -> Layer -> Data Source Manager".
  2. Select the "Protocol: HTTP(S), cloud, etc." Source Type.
  3. Add the URL.

Note: when adding the URL to QGIS, the URL should NOT include the /VSICURL/ prefix and the URL should be URL encoded.

Example QGIS URL:

https://api.maxar.com/analytics/v1/raster/ortho-with-overviews/geotiff?function=pansharp_ortho&p=collect_identifier=%2210300100E538FE00%22&p=crs=%22EPSG:3857%22&p=bands=%22red,green,blue%22&p=dra=true&maxar_api_key=<YOUR_KEY>

Note: This example uses the ortho-with-overviews IPE Script becasue it is suitable for visualization at any map scale.

And click the "Add" Button to display the image.

QGIS add data source