How to open a KMZ file. The KML file format and its use in Google Maps. Kml introduction open

The KML format is an extension that stores geographic data for features in Google Earth. Such information includes placemarks on the map, an arbitrary area in the form of a polygon or lines, a three-dimensional model, and an image of a part of the map.

Let's consider applications that interact with this format.

Google earth

    1. After starting, click on "Open" in the main menu.

  1. Find the directory with the original object. In our case, the file contains location information. Click on it and click on "Open".

The program interface with the indication of the location in the form of a label.

Notebook

Notepad is a built-in Windows application for creating text documents. It can also act as a code editor for certain formats.

    1. Run this software. To view the file, select "Open" on the menu.

  1. We choose "All files" in the appropriate field. Having selected the desired object, click on "Open".

Visual display of the contents of the file in Notepad.

We can say that the KML extension has little distribution, and is used exclusively in Google Earth, and viewing such a file through Notepad will not be useful to anyone.

The first option with which you can open the KMZ format is the Google Earth application. This is a universal mapping program from a world famous company.

All you have to do is select the "File" - "Open" menu item in the running software. At the next stage, select the folder in which the file itself is located, select it and press the "Open" button.

Another way is to drag the file from Explorer to the area where the maps are displayed.

Using the Google SketchUp app

This program is used for three-dimensional modeling, and the file with the KMZ extension can store all kinds of 3D models of objects necessary for a realistic demonstration of the terrain.

To open it, click Import-File. As in the previous case, we find the desired folder, select the desired file in it and click Import.

Geographic information software Global Mapper

This program supports a large number of cartographic formats, including the one mentioned in this article. Thanks to the application, the data contained in it can not only be edited, but also transformed.

Opening is carried out using the menu item Open Data File (s) - File. Further, everything is similar to the previous options.

Geographic information platform ArcGIS Server

We'll be using the desktop version, ArcGIS Explorer. The KMZ file, which is also used in this application, helps to set the coordinates of the required object.

You can open it by dragging and dropping from Windows Explorer directly into the software workspace.

Announcement

The KML Misc file format

KML files are stored in XML format and were originally developed for the Keyhole mapping program. In 2004, Google bought Keyhole Inc., which is why KML files are now heavily used by Google's mapping services Google Maps and Google Earth.

Technical details of KML files

KML files contain information that is stored in XML format. This information includes both images and simpler data such as lines, polygons, and points. These files are used to store information about a specific location on the map. The KML file allows the user not only to mark a location on the map, but also to add content (in HTML format), texture and view from different angles. To open KML files in Google Maps, all it takes is the KML file itself, hosted on the web. A separate link for the extension in the Google Maps search bar will open it.

More information about the KML file format

KML (Keyhole Markup Language) is a file format used to display geographic data in Google Earth, Google Maps, and Google Maps for mobile applications.

KML uses a tag-based structure with nested elements and attributes and is based on the XML standard.

You can use Google Earth, an XML editor, or a simple text editor to create KML files.

KML files and associated images (if available) can be compressed using the ZIP format into KMZ archives.

With KML files, you can:

  • set various icons and make signatures to indicate places on the surface of the Earth,
  • create different angles for selected objects by changing the position of the camera,
  • use different overlay images,
  • define styles to customize the display of an object, apply HTML code to create hyperlinks and inline images,
  • use folders to hierarchically group items,
  • dynamically receive and update KML files from remote or local hosts,
  • receive KML data according to changes in the 3D viewer,
  • display textured 3D objects COLLADA

The following can be used as objects in KML files:

Placemarks (Placemark object) - the simplest element, defines a placemark - designation of a position on the Earth's surface using an icon in the form of a yellow button.

Paths - lines of a certain thickness and color

Polygons - defines the color of the lines and the color of the signature.

Images - Overlay images of the Earth's surface allow you to superimpose an image on the Earth's landscape, can be movable and scalable, or non-movable, for example, a logo.

Three-dimensional model - allows you to connect the description of three-dimensional objects (for example, buildings and structures). A three-dimensional model can be set in two ways: by setting the height of flat figures (by pulling) and by linking to a full-fledged model in the COLLADA format (Google SketchUp).

The simplest example of a KML file.



Palace of Sports
Sports Palace "Nagorny" ave. Gagarina, 29
43.979459,56.291908,0


I will describe the structure of this file.

The first line is the XML header. This is the 1st line in every KML file. There must be no spaces or characters before this line.

The second line is used to declare the KML namespace. This is the 2nd line in every KML 2.1 file.

A Placemark containing the following elements:

- name, a shortcut used to denote a label

- description, the description that appears in the comment box attached to the tag

- Point, indicates the position of the mark on the Earth's surface (longitude, latitude and optionally altitude).

This file can be loaded into the Google Earth program by choosing File - Open from the menu.

It can also be downloaded using the Google Maps API.

Example code:

An example of using Google Earth on the site

If we load it in the browser we will see

You can also view the KML file on Google Maps.

Beforehand, it is necessary that your KML file must be placed on a website on the Internet.

From the beginning you need to go to the address http://maps.google.ru/

Then, in the search bar, enter the address of your KML file on the Internet, for example, http: //site/examples/kml/prim_kml_1.kml and click on the "Search on the map" button.

Your KML file will be displayed on a Google map.

To be continued…

The most common problem that causes users to be unable to open this file is an incorrectly assigned program. To fix this in Windows OS, you need to right-click on the file, in the context menu, point the mouse to the "Open with" item, and select the "Select program ..." item in the drop-down menu. As a result, you will see a list of installed programs on your computer, and you will be able to choose the appropriate one. We also recommend checking the box next to "Use this app for all KML files".

Another problem that our users also encounter quite often is that the KML file is corrupted. This situation can arise in many cases. For example: the file was downloaded incompletely as a result of a server error, the file was damaged initially, etc. To fix this problem, use one of the recommendations:

  • Try to find the desired file in another source on the Internet. You may be lucky enough to find a more suitable version. Google search example: "File filetype: KML". Just replace the word "file" with the name you want;
  • Ask to send you the original file again, it may have been damaged in transit;
File extension .kml
File category
Example file (2.05 KiB)
Related programs Blender (Windows, Mac & Linux)
Blue Marble Geographics Global Mapper (Windows)
ESRI ArcGIS for Desktop (Windows)
Google Earth (Windows, Mac & Linux)
Google Maps (Web)
Merkaartor (Windows, Mac & Linux)
Keyhole PRO (Windows & Mac)