1

System — MacOS 10.14.6, QGIS 3.4.14

Issue — When I select a multi-band raster image layer, then select Layer>Save as… KML is not one the many formats in the popup list.

Workaround — Save the Multi-band layer as GeoTIFF. Drag and drop the GeoTIFF onto the Google Earth. Then in GE, Save Place as… to generate a KML or KMZ file.

Is this the best/easiest way to save a multi-band raster image in QGIS to a KML/KMZ format?

I posted this question so that people who search for “QGIS save raster as KML” would get at least one hit that…

a - confirms — that saving a raster layer to KML is not as simple as selecting the layer, selecting Save as and then selecting KML as the format.

b - provides a work around — save the raster layer as a GeoTiff (rendered image), then drag & drop the GeoTiff onto Google earth pro, then Save Place as… KML/KMZ. BTW this drag & drop even works for large GeoTiffs because Google earth pro gives you the option to tile the image or reduce the resolution on import. This work around also allows using an image editor (e.g. Photoshop) to adjust the colors, exposure, contrast, etc. of the GeoTiff prior to importing it into Google earth.

I had hoped that I was wrong and that QGIS had an easy way to save a raster layer in KML/KMZ format that didn’t involve tiling.

  • 2
    Please read up on what KML/KMZ is, and what raster data is. – Erik Jan 7 at 15:16
  • 2
    Since KML is a vector-mostly format, I wouldn't expect it to be on the export drop-down list for a raster. – Vince Jan 7 at 15:25
  • 1
    FWIW I already knew that KMZ format files are simply KML format files that have been zipped. I’ve done a lot of raster scan and aerial photo (CIR and IR) overlays in Google earth. And Google earth will gladly save these raster images in either KML or KMZ format. So I really didn’t think that expecting QGIS to offer to save a CIR or IR raster layer directly in either KML or KMZ format was too big an ask. – GetRealBro Jan 7 at 16:44
  • 2
    I found a few similar questions: gis.stackexchange.com/questions/143344 and gis.stackexchange.com/q/261636/81764. Both seem to imply there's no simple/convenient way to export a raster to KML/KMZ format in QGIS. One answer suggests it might be possible with GDAL or a plugin. Since KML format was developed for Google Earth, it makes sense that GE would have more options for it than other programs. – csk Jan 7 at 18:54
  • 2
    The format is a raster file (often tiled into a directory) that is georeferenced with a sidecar KML vector file. GDAL has a driver for that gdal.org/drivers/raster/kmlsuperoverlay.html. – user30184 Jan 7 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.