Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have some KMZ files that are basically aerial imagery that has been referenced to Lat/Long. I would like to convert them to a projected UTM coordinates such as NAD 83 in a geo-jpg format. I was hoping to use QGIS or some low cost method. I can't seem to get these KMZ files into QGIS to start with. If I change the file extension of KMZ to a zip, I see both the KML file and then a folder with the unprojected jpg file. QGIS just says it doesn't support or it's not valid format both the KMZ as raster format or the KML (with attached jpg) as a vector format. Any ideas what I could do here?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

kmz with imagery (like Garmin Custom Maps) are raster files. So you have to use Add Raster Layer, not Add vector layer. Unfortunately, GDAL only supprts kml as vector layers.

The problem is that the unzipped img files do not have georeferencing information stored by themselves. This is stored in the doc.kml file; but this is not in a format GDAL understands.

You have to georeference the files manually with the information of the kml file.

Tere is a plugin for creating Garmin Custom Maps out of QGIS, but unfortunately nothing to load them into QGIS.

share|improve this answer
    
Thanks for the answer Andre. Yeah, I kind of figured that was the case. I don't get why GDAL doesn't support KMZ or KML's as raster layers. It seems there is tough to find software that will outside of Google Earth that has no export or transformation features. Can you explain how I could manually georeference the files using the lat/long values in the kml file? I can see them in there but not seeing how I get those jpg file and converted to UTM. –  wilbev Mar 16 '13 at 18:45
1  
The doc.kml gives you the north/south/east/west coordinates in WGS84. So you can load the image in the georeferencer, point the four edges, and enter the coordinates listed in the kml file with copy and paste. Would be a nice idea for a plugin, if you have lots of them. –  Andre Joost Mar 16 '13 at 18:49
    
Yes, it would be a nice plug-in. I'm pretty new to QGIS, and I'm not finding a good way to get this converted to UTM projected jpg. I see Translate under Raster menu, but that doesn't seem to do an true transformation if I select a different projection such as UTM. –  wilbev Mar 16 '13 at 19:16
    
@wibev - select thegeoreferenced image layer, and save layer as.. –  Brad Nesom Mar 16 '13 at 20:03
1  
No, Save Layer As only works for vector layers (and is not available for raster layers). You have to use Raster -> projection -> Transform. But this only works for Geotiffs, which have the CRS information stored within. Images with worldfile won't work. –  Andre Joost Mar 16 '13 at 20:32
add comment

If you use the coordinates in the doc.kml to create a jpeg world file[1] alongside your unzipped jpeg and tell QGIS that your image is EPSG:4326, you will then be able to warp it into your new projection. If you don't know how to calculate the world file, post the kml.doc in a gist and someone here can help you with the calculation.

[1] http://en.wikipedia.org/wiki/World_file

share|improve this answer
    
For privacy concerns, I can't post the doc.kml file. I did try just manually copying and pasting the lat/long values into the 4 corners of the image, but it ended up not being very accurate, so it's like the lat/long values are not the true edits of the image. So I'm not sure what I'm doing wrong. –  wilbev Mar 17 '13 at 0:06
    
The world file isn't the 4 corners. It is the upper left and then the pixel size, which you can calculate from the swath size (n-s) & (w-e) divided by the pixel size in each dimension. –  Dan Dye Mar 17 '13 at 2:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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