Does KMZ import work?


I am using Sketchup for many years and in many versions. I never have managed to import a single KMZ file without error. Is there a way to make it work?


KMZ is a zip file. it may or may not include a Collada file. If it does, it should import into SketchUp ok, if it doesn’t, it won’t.

As far as I understand, a kmz file contains a kml file. I exported a kml file from Google Earth, zipped it and tried. that does not work though.

…plus the dae - Collada file (in a folder: models)

You need to export it as kmz. Then it will automatically contain the kml and dae file in a models folder inside the kmz. (You can rename the kmz to zip and check the structure…)

A .kmz file is a zip archive with the extension changed from .zip. It can contain several kinds of data in its folders. One such type is a kml (Keyhole Markup Language) file. Another is a dae (Collada) file. Sketchup can import and export kmz files that contain Collada. It has no native ability to deal with kml. I have an experimental kml importer that you can PM me if you would like to try it out.

By way of more complete background, this all goes back to Google and the period when Google owned SketchUp.

Google Earth is, naturally enough, a “round earth” system that works in a global longitude, latitude, altitude coordinate system. Google Earth needed a way to specify what they call “Placemarks” on the Earth - pins, outlines of areas, etc… So they bought a company named Keyhole and incorporated that company’s XML extension (kml) for this purpose. To this day, Google Earth uses kml to describe places and to capture any markings you draw in GE Pro. When you export from Google Earth Pro, you get a kmz that contains a kml file.

When Google decided to include 3D buildings in GE, they tried using kml to describe them. But this proved to be very awkward because buildings are normally designed using orthogonal x,y,z local coordinates, not global long, lat, height. Lines of constant longitude or latitude are curved, not straight; lines that are verticals in global coordinates are not parallel! So, Google decided they needed a 3D x,y,z modeling language to describe buildings and chose Collada, a free, publicly-suppported modeling representation.

But like most 3D modeling formats, Collada is not Earth-referenced (aka geolocated). Each model has its own abstract origin and axes that have no explicit tie to the Earth. So Google needed to add geolocation information to a model. To support this idea while still having kml for other data, they created kmz. The archive can contain geolocation data, kml model(s) and dae model(s).

When Google bought SketchUp, in the hopes of getting free input of 3D buildings from a larger community, they implemented an exporter to convert a SketchUp model to collada and to wrap it together with geolocation data into a kmz. To this day, that is the only variety of kmz that SketchUp natively supports for import or export .


This was the best explanation on the whole internet on that matter. It should be copied to a wikipedia page or so, thanks!
So, my intention is to combine a location snapshot from a geolocation import with a shape from a property titles database to mark the property boundaries on location snapshot to do some architectural plannings from a good baseline. Does your importer allow this?


My importer will handle most types of kml geometry, though not ones that explicitly depend on the Google Earth surface. For example, ones that include walls that drop down to the surface from an outline, that rise vertically from the surface, or that follow a fixed height above the terrain. I left these out partly because because they would be complex to implement, partly because I could not find any kml with real examples and partly because I am not sure Google Earth will even create or export them any more.

The extension also does not currently handle kml styles. I skipped styles mainly because they include many properties for which SketchUp has no equivalent, such as line width and style. Colors could, in principle, be handled but given that the rest of a style could not, I skipped styles entirely.

The importer does correctly handle the longitude and latitude of placemark “pins”, tracks, and outlines - to within limits I discuss below.

Google Earth no longer permits export or use of their images and terrain data by others. They only allow export and import of annotation kml (wrapped as kmz) to support “My Places” within Google Earth.

Due to this change, SketchUp had to find different sources for geolocation terrain and images. Both the resolution of the new data and their “navigation” (i.e. alignment to longitude, latitude) may now differ slightly in SketchUp from what you see in Google Earth. That means even if I import their longitude and latitude precisely, your kml markups may be slightly offset from the geolocation images and terrain in SketchUp. The shapes of markings are generally good, but I have seen area-wide offsets of up to a couple of meters. If you are seeking accuracy comparable to a ground survey, this is not the way to get it. I cannot promise any particular level of accuracy, as that is out of my hands. This is a limit of satellite data, not really of SketchUp or GE. You can probably work around this by moving the imported geometry horizontally in SketchUp to re-align it with features on the ground image. Of course that begs the question of why not draw it in SketchUp in the first place.

There is also an issue with imported altitudes. In many kml elements, altitude is optional and might not even be present. But even when it is present, I have seen troubling discrepancies between the values and the terrain surface in SketchUp. Again, I think this is due to different data sources. But regardless, I recommend using only the horizontal positioning projected onto the geolocation image and/or terrain.

I have not published this extension yet because I have had only a few people contact me to test it. They have reported success, but the test sample is so small I still regard this as beta. PM me if you want to give it a try.

1 Like