Ask Sawal

Discussion Forum
Notification Icon1
Write Answer Icon
Add Question Icon

which programs use kmz files?

3 Answer(s) Available
Answer # 1 #

A KMZ file consists of a main KML file and zero or more supporting files that are packaged using a Zip utility into one unit, called an archive. The KMZ file can then be stored and emailed as a single entity. A NetworkLink can fetch a KMZ file from a web server. When the KMZ file is unzipped, the main .kml file and its supporting files are separated into their original formats and directory structure, with their original filenames and extensions. In addition to being an archive format, the Zip format is also compressed, so an archive can include only a single large KML file. Depending on the content of the KML file, this process typically results in 10:1 compression. Your 10 Kbyte KML file can be served with a 1 Kbyte KMZ file.

Google Earth and Google Maps can read KML and KMZ files directly, and they can save files as KMZ files. By default, the main KML file is named doc.kml.

Note: For clarity, this page refers to the main KML file within a KMZ archive as doc.kml. This main KML file can have any name, as long as it ends in .kml, and as long as there is only one .kml file.

You should create a KMZ file if your doc.kml file is larger than 10 Kbytes, or if the doc.kml files references other files (images, sound files, models, textures).

This section provides a few simple recommendations for the creators of KML/KMZ files. The example used in this section is from the Jimmy Buffett website, which uses the KML format to show planned concert tours and related highlights on Google Earth.

Download the KMZ file that contains this tour. (Used by permission.)

Note: Google Earth 6.0 strictly enforces the following set of guidelines when resolving relative references in a KMZ file (especially see item 4 in the following list). Earlier versions of Google Earth were less rigorous in how they resolved such relative references. As a result, some relative references that worked in Google Earth 5.2 and earlier releases may now need to be edited in order to work with versions 6.0 and later.

Follow these guidelines when creating KMZ files:

These external links can be either absolute or relative references, as described in the following section. They can refer to files within the same KMZ file, or to files contained in other KMZ files or stored elsewhere on the web. With the exception of the element in , relative references are always resolved in relation to the doc.kml file, as explained in the section Resolving Relative References.

Absolute references contain the full URL for the linked file. They are useful for files posted on a central server and are unambiguous. However, if you use absolute references to local files, the links will break when the files are moved to a new system. Relative references avoid this problem.

Here is an example of an absolute reference to a file stored on a central server:

In general, relative references are resolved in relation to the doc.kml file. Any relative URL is resolved against the directory that contains this file, which is considered the root of the KMZ file. In the Hawaiian tour example, the base URL is similar to the following (depending on where you download the KMZ file):

If you wanted to refer to a file located in a different KMZ file (for example, to images/jimmyphoto.jpg contained in margaritavillealbum.kmz, you would use the ".." notation to go up one level in the directory structure, which would take you out of the current KMZ file (buffetthawaiitour.kmz):

Note: The rules for resolving relative references in a KMZ archive are based on the RFC 3986 Section 5 standard for resolving web URLs. The base URL is determined by the location of the doc.kml file, and all relative URLs are resolved in relation to that base URL.

The element contains a element that specifies a COLLADA file to load into Google Earth. COLLADA files specify 3D objects and have a .dae file extension. The element also contains an element, that contains a mapping between the (the texture file to be fetched by Google Earth) and the (the path specified for the texture file in the COLLADA .dae file). If the element contains a relative path, Google Earth interprets this path as relative to the .dae file that references it (not relative to the doc.kml file as in all other cases). For example:

Use Windows Explorer or the Mac Finder to create a Zip archive. Select the contents of the folder that contains the doc.kml file and related resources and choose an option such as "WinZip > Add to Zip file ...." The Java JAR library also has a Zip library for programmatically creating and extracting a Zip archive, and Linux has command line versions of zip and unzip.

Note: When you are creating the Zip archive, be sure to select the contents of the folder containing the doc.kml file, not the folder itself.

After you create the archive, change the .zip file extension to .kmz. To extract the files from the archive, change the .kmz file extension back to .zip and use the Zip utility to unzip the archive.

Katherine Višnjić
Track Foreman
Answer # 2 #

Tips for Web-Dependent Projects

Sometimes you'll want your placemarks to reference images on the web. This could come in handy if you will be updating the images periodically, you want to include attributed images from another site, or if you simply want to reduce the download size of your KMZ file.

Here are a few tips for using images on the web in your KML file:

Here's a simple video example of making a KMZ file (without including images) and publishing it on the web:

Using KMZ Files for Web-Dependent Projects

Hussains rlwfjw Avanish
Answer # 3 #
  • Google Earth.
  • Google Earth Pro. Trimble SketchUp. Blue Marble Geographics Global Mapper. ESRI ArcGIS Pro.
  • Google Earth Pro. Trimble SketchUp. Blender with Google Earth Importer plug-in.
  • Linux. Google Earth Pro. Blender with Google Earth Importer plug-in.
  • Web. Google Earth. Google Maps.
Jeevant rwarzxg