2

I have a KML file for a NASA image. I want to create a world file from it so I can use the image in say QGIS. Is it possible to extract the key info (bounding coordinates) from the KML? It seems to be made up of lots of links to smaller tiles of the image

There is already another post on here (I can't post any more links, but search for "export-georeferenced-image-overlay-from-kml" which points to WorldFileTool and a KMZ to worldfile converter

The first (WorldFileTool) seems to never link to the all important zip file

The second throws an error when I run it.

Hence I am a bit stumped. I can georeference it by hand if needs be, but I had hoped the KML might give me the easy answer.

Any suggestions would be great.

1
  • KMLs are XMLs so you can open the KML in Excel and view the coordinates of all the tiles (n,s,e,w). Look at the KMLs are XMLs so you can open the KML in Excel and view the coordinates of all the tiles. Look at the ns1:north5,ns1:south6, ns1:east7, ns1:west8 columns to try to find the northwest, northeast, southeast, southwest (most) tiles. Once you find those, you can calculate the latitudes and longitudes of the bounding coordinates.
    – Zach
    Commented May 24, 2013 at 16:27

5 Answers 5

1

I recently found this link (and a printer friendly version) to the WorldFileTool which you may want to try.

I just tried and it works, but for kml files it only converts one overlay. If you import a superoverlay, it only works for the smallest scale (lowest resolution) tile.

0

You could also try this bash shell script.

It is in French, but Google Chrome should offer to translate the page for you automatically. You can also read the script as a text file and convert the comments to English with Google Translate if you like. Unfortunately, I cannot get this to work on a 64bit Windows 7 with the OSGeo4W Msys shell.

1
  • Program seems to run correctly, but the output is a series of blank folders for each zoom level of a superoverlay kml file. Have not tried with a ground overlay kml or kmz file.
    – Clay
    Commented Oct 23, 2013 at 3:19
0

Also have a look at SuperOverlay

You can load a kml or kmz superoverlay file.

This program is designed to make Superoverlay files, so it will re-split the existing superoverlay image tiles into new image tiles, but if you check the "Write world files" box you will then have world files for each of the new tiles. You can then load each georeferenced tile into qGIS (or equivalent) and then merge them into one raster from there.

Few things to note: To make sure you only output tiles at the highest Level of Detail (LOD) [ie highest resolution, or the tiles that are visible at the largest scales], you will need to make sure all of the input tiles of the kml/kmz are only at that LOD. You should then make sure that the "Maximum LOD" is set to 1. Otherwise you will split the existing highest LOD into yet higher LOD, which is obviously unnecessary as it will generate more (smaller) tiles with no gain in detail.

Unfortunately, you have to set these settings for each and every tile and cannot do it for the whole imported kml/kmz. This is very annoying and I am going to email the developer to see if this can be changed. Note: this was done on the free trial, so perhaps the purchased standard, plus or pro versions are not so limited. I will let you know.

0

I also had a look at the kmlExtractor. It is also in French.

When you get the program to run correctly, the output only seems to be a series of folders for each Level of Detail (LOD) of a superoverlay kml/kmz file. Will supposedly work with a Networked Linked superoverlay kml/kmz file.

I had trouble getting it to work with local superoverlay kmz/kml files.

Have not tried with a ground overlay kml or kmz file.

Program is a vb.Net project. Compiled program and uncompiled project can be downloaded.

0

I dug up an old 0.3.0 version of WorldFileTool--it only works for jpg based ImageOverlays and creates corrupt PGWs. The file formats are equivalent and so for a time I was converting to jpg and the copying the jgw back to pgw.

Today, I rebuilt the latest version from 19-Aug-2008 from subversion repository and now it seems to work even with creating PGWs:

It would be a nice to have a command line interface to this UI. I wasn't able to get any of the other tools in this question working sufficiently.

EDIT: I posted an updated version that can be included in a makefile or script at: Convert a KML ImageOverlay to World Files with GDAL

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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