0

I would extract a TIFF layer from a KML file for raster analysis. The data are available here (see link below interactive map).

I have unzipped the KMZ to KML.

Layers of the KML open in Google Earth

I have followed some previous Q&As on KML to Layer gives ERROR 000210 in ArcGIS Desktop? and Reading KML file into R? which explain how to convert vector data from a KML. However, I haven't found anything which explains how to convert/extract a raster from KML.

closed as too broad by Vince, whyzar, Fran Raga, PolyGeo Apr 29 at 19:25

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Please decide which of ArcGIS Pro, QGIS or R you wish to ask about in this particular question. That you you can describe precisely what you have tried using that software. – PolyGeo Apr 29 at 19:27
1

A kmz file is a zip file. Unzip it with your favourite unzip utility and you should see a doc.kml and a bunch of PNG files.

Although the layers have "tiff" in the names, there is no TIFF data here. All the image overlays are in the PNG files.

Each image overlay is described in doc.kml in a GroundOverlay section of XML:

 <GroundOverlay id="0">
    <Snippet></Snippet>
    <drawOrder>1000</drawOrder>
    <name>overall_suit_opt_5cl_min.tif</name>
    <Icon>
      <href>Layer0.png</href>
      <viewBoundScale>1.0</viewBoundScale>
    </Icon>
    <LatLonBox>
      <north>98.00000803172586</north>
      <south>-70.00000073015684</south>
      <east>216.0000206530092</east>
      <west>-216.0000018775463</west>
      <rotation>0</rotation>
    </LatLonBox>
  </GroundOverlay>

This tells you that overall_suit_opt_5cl_min.tif is Layer0.png and on the world it is mapped to those bounding coordinates.

Given that, and the resolution of Layer0.png (1024x398 pixels) you can compute a "world" file called Layer0.pngw and then any GIS that uses GDAL (basically all of them) will correctly read Layer0.png onto the right place on the planet.

Constructing world files is described elsewhere, eg https://en.wikipedia.org/wiki/World_file

Each of the layers in your KMZ seem to have different bounds, so you'll have to compute a world file for each one you want. They also have different sizes.

I had a quick look but couldn't find a program to do all this automatically. If I had one or two to do I'd do it by hand. If I was doing 11 I'd write some code (python) to do it.

  • Thank you for explaining how the file is constructed - I've now managed to read it into ArcGIS by creating the World File. – carrots Apr 30 at 10:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.