Menu
Is free
check in
the main  /  Navigators / KML open. How to open a kmz file

KML open. How to open a kmz file

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

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

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

Use Google Sketchup application

This program is used for three-dimensional modeling, and all sorts of 3D models of objects required for realistic demonstration of the area can be stored in the KMZ extension file.

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

GLOBAL MAPPER GLOBAL MAPPER

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

Opening is done using the Open Data File (S) menu item. Further, all similar to previous options.

Geoinformation Platform ArcGIS Server

We will use it desktop version - ArcGIS Explorer. KMZ file, which is also used in this applicationIt helps to set the coordinates of the required object.

You can open it by dragging out the Windows Explorer directly to the workspace.

Ad

KML MISC File Format

KML files are stored in XML format and initially designed for Keyhole cartographic program. In 2004, Google bought KEYHOLE INC., and that is why KML files are now actively used by Google's services related to cartography - Google Maps and Google Earth.

KML file technical information

KML files contain information that is stored in XML format. This information includes both images and simpler data - lines, polygons and points. Such files are used to store information about a particular location on the map. The KML file allows the user not only to mark the location on the map, but also add content (in HTML format), texture and view near different angles. To open KML files in Google Maps, all that is required is the KML file itself placed on the Internet. Using a separate extension link in the string google search Maps will open it.

Additional information about KML format

File extension .kml
File category
File example (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)

KML IS A File File Format Used to Display Geographic Data in An Earth Browser Such AS Google Earth. KML USES A TAG-Based Structure with Nested Elements and Attributees and Is Based on The Xml Standard. All Tags Are Case-Sensitive and Must Appear Exactly As The Kml Reference. The Reference Indicates Which Tags Are Optional. Within A Given Element, Tags Must Appear in The Order Shown in the Reference.

If you "Re New to Kml, Explore This Document and The Accompanying Samples Files ( Samplesinearth.) To Begin Learning ABOUT THE BASIC STRUCTURE OF A KML FILE AND THE MOST COMMONLY USED TAGS. The first Section Describes Features That Can Be Created with the Google Earth User Interface. These Features Include Placemarks, Descriptions, Ground Overlays, Paths, and Polygons. The Second Section Describes Features That Require Authoring Kml with a Text Editor. WHEN A TEXT FILE IS SAVED WITH A .kml Or. .kmz. EXTENSION, Earth Browsers Know How to Display IT.

Tip: To See The Kml "Code" for a Feature in Google Earth, You can Simply Right-Click The Feature in the 3D Viewer of Google Earth and Select Copy. Then Paste The Contents of the Clipboard Into Any Text Editor. The Visual Feature Displayed in Google Earth Is Converted ITS KML Text Equivalent. Be Suore To Experiment with this feature.

For a Discussion of How to Use Some of the Key Features in Kml, See the Developer "S Guide.

Table Of Contents.

Basic Kml Documents

The Simplest Kind of Kml Documents Are Those That Can Be Authored Directly in Google Earth-That is, You don "T Need to Edit or Create Any Kml in a text Editor. Placemarks, Ground Overlays, Paths, and Polygons CAN ALL BE Authored Directly In Google Earth.

Placemarks.

A Placemark Is One of the Most Commonly Used Features In Google Earth. IT MARKS A POSITION ON THE EARTH "S Surface, using a yellow Pushpin AS The icon. The Simplest Placemark Includes Only A Element, Which Specifies The Location of the Placemark. You can Specify a Name and A Custom icon for the placemark, and you can Also Add Other Geometry Elements to IT.

AS AN Example, Enable The "Absolute Positioning: Top Left" Folder In The Kml Samples File and You Will See A Screen Overlay at The Top Left of the View window. This Was Created With The Following KML Code:




Absolute Positioning: Top Left

http: //syt/kml/documentation/images/top_left.jpg






Positioning Is Controlled by Mapping A Point In the Image Specified by To a Point On The Screen Specified By . In This Case, The Top-Left Corner of The Image (0,1) Has Been Made Coincident with the Same Point On The Screen.

Check The Other Examples in the folder to see how it is possible to Obtain Other Fixed Positions, and to create images That Size Dynamically with Screen Size. Note That. xUNITS. And. yunits. CAN ALSO BE SPECIFIED AS "PIXELS" FOR PRECISION CONTROL.) FOR FURTHER DETAIL, SEE THE KML 2.2 REFERENCE.

Network Links.

A NETWORK LINK CONTAINS A Element with AN. (A HYPERTEXT REFERENCE) THAT LOADS A FILE. Their CAN BE A LOCAL FILE SPECIFICATION OR AN ABSOLUTE URL. Despite The Name, A Does Not Necessarily Load Files From The Network.

Their IN A LINK SPECIFIES THE LOCATION OF ANY OF THE FOLLOWING:

  • An image file Used by Icons in Icon Styles, Ground Overlays, and Screen Overlays
  • A Model File Used in the Element.
  • A KML or KMZ File Loaded by A Network Link

The Specified File Can Be Either Local File Or A File On A Remote Server. In Their Simplest Form, Network Links Are A Useful Way to Split One Large KML File Into Smaller, More Manageable Files on The Same Computer.

So far, All of Our Examples Have Required That The Kml Code Be Delivered to Google Earth from The Local Machine. Network Links Give You The Power to Serve Content From A Remote Location and Are Commonly Used to Distribute Data to Large Numbers of Users. In This Way, IF The Data Needs To Be Amended, It Has to Be Changed Only At The Source Location, and All Users Receive the Updated Data Automatically.

CGI scripting for kml

INDITION TO POINTITION TO FILES CONTAINING STATIC DATA, A NETWORK LINK "S Can Point to Data That Is Dynamically Generated-for Example, by A CGI Script Located on A Network Server. With some Knowledge of A Scripting Language Such As PHP, Python, Or Perl, You Can Create A Script That Delivers A Stream (OR File) of Kml Data to Each Network Link.

Two Things Are Necessary for delivering Kml Through A Network CGI:

When A Call Is Made from the Client (Google Earth) to the server, The Server Must (1) Return A Response Code of Http 200 and (2) Set The Response "S Content Type to text / Plain or Application / vnd.google -Earth.kml + XML.

The Response Must Be Valid KML. For Complex Applications, Proper Error Handling Is Very Important.

Tip: A Simple Way to Handle Errors Is to Parse The Server "S Error As The Text for a Folder Name. For example, You Could Have the Server Return database inccessible. AS A String. This Is More Informative (And More User-friendly) Than Letting The Connection Drop.

The Following Examples Use Python, But The Are Equally Valid in Any Other Scripting Language.

Generating a Random Placemark

The Following Python Script Generates Random Integer Values \u200b\u200bFor latitude And. longitude AND THEN INSERTS THOSE VALUES INTO THE Element of A. Whenever The Network Link is Refreshed, The Python Script Runs Again and Generates Kml with New Latitude and Longitude Values.

#! / usr / bin / python import random latitude \u003d random.randrange (-90, 90) longitude \u003d random.randrange (-180, 180) kml \u003d ("\\ n "" \\ n "" \\ n "" Random Placemark.\\ n "" \\ n "" % d,% d\\ n ""\\ n ""\\ n """)% (Longitude, Latitude) Print" Content-Type: Application / VND.Google-Earth.kml + XML \\ N "Print KML

Here IS An Example Of A KML File Containing A Network Link That Loads This Python Script:




Network Links.
0
0
Network Link Example 1

Random Placemark.
0
0
A Simple Server-Side Script That Generates a New Random
Placemark on Each Call

0
0

http: // yourserver.com./cgi-bin/randomplacemark.py.



View-Based Refresh QUERIES

A Standard Network Link is a Uni-Directional Link: Data Flows Only From The Server to Google Earth. The View-Based Refresh Enables Bi-Directional Communication. When The View-Based Refresh Is Active, Google Earth Returns The View Coordinates to the Server at a Specified Time. This May Be Every n. Seconds, Minutes, Or Hours, Or Once a Certain Amount of Time Has Elapsed Since The View Stopped Moving. See In The KML 2.2 Reference.

The Coordinates Are Returned to the The Server by Means of An Http Get That Appends The Coordinates As Follows (This Is The Default Bounding Box Information):

Get / Path / To / SEVER / Script / Query? BBOX \u003d http / 1.1

If The Request Were Made While The User Was Looking Down On San Francisco, The Coordinates Might Look As Followows:

Get /Path/To/Server/Script/Query?bbox\u003d-122.497790,37.730385 ,-122.380087,37.812331 HTTP / 1.1

This Feature Can Be Used For Some Very Creative Applications, But to Get You Started, A Simple Example Is Present Below.

Tracking a Point Directly Under Your View

The Following Server-Side Python Script Parses The Return Message Sent by Google Earth and Responds with a Placemark at the center of the screen. Each Time The Network Link is Refreshed, a new placemark is generated.

#! / usr / bin / python import cgi url \u003d cgi.fieldstorage () BBOX \u003d URL ["BBOX"]. Value BBox \u003d BBox.split (",") West \u003d Float (BBOX) South \u003d Float (BBOX) EAST \u003d Float (BBOX) North \u003d Float (BBOX) center_lng \u003d ((East - West) / 2) + West Center_Lat \u003d ((North - South) / 2) + SOUTH KML \u003d ("\\ n "" \\ n "" \\ n "" VIEW-CENTRED PLACEMARK\\ n "" \\ n "" % .6f,%. 6f\\ n ""\\ n ""\\ n """)% (center_lng, center_lat) Print" Content-Type: Application / VND.Google-Earth.kml + XML \\ N "Print KML

Andhere Is The Kml for the Network Link That Loads The Python Script:




Network Links.
0
0
Network Link Example 2

View Centered Placemark.
0
0
THE VIEW-BASED REFRESH ALLOWS THE REMOTE SERVER TO CALCULATE
The Center of Your Screen and Return a Placemark.

0
0

http: // yourserver.com./cgi-bin/viewCenteredPlacemark.py.

2
onstop.
1



The Principle Illustrated in This Example Can Be Used For Some Very Complex Applications. For example, If You Have A Database of Geographic Information, You Can Extract The COORDINATES OF THE WEWER, MAKE A COLODINATES OF THE WEWER, MAKE A CALL TO THE DATABASE FOR DATA SPECIFIC TO THE VIEW, AND RETURN IT TO Google Earth AS KML.

3 KML MIME TYPES

WHEN RESPONDING TO A REQUEST FROM Google Earth (Or Any Earth Browser), a KML Server Must Follow a Certain Set of Rules So That Google Earth Can Correctly Interpret Its Responses.

Upon Success, The Server Must Return A Response Code of Http 200 and Set The Response "S CONTENT-TYPE TO A SUITABLE MIME TYPE, AS DESCRIBED HERE.

Google Earth Reads Kml and Kmz Files. THE MIME TYPE FOR KML FILES IS

  • Application / VND.Google-Earth.kml + XML

The Mime Type for Kmz Files Is

  • Application / VND.Google-Earth.kmz

For Apache, Add these Lines to the httpd.conf. File:

  • AddType Application / VND.Google-Earth.kml + XML .kml
  • AddType Application / VND.Google-Earth.kmz .kmz

See the Microsoft Documentation for Details on Setting Up Mime Types on Microsoft "S IIS.

The Body of The Response Must Contain Valid Kml Data, Including The Xml Declaration (). If The Server Returns Invalid Kml, The Network Link Will Stop, Deactivate, and Output An Error Message.

The KML format is an extension in which the geographical data of objects in the Google Earth program is stored. Such information includes tags on the map, an arbitrary area in the form of a polygon or lines, a three-dimensional model and a map of the map.

Consider applications that interact with this format.

Google Earth.

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

  1. We find a directory with the source object. In our case, the file contains location information. Click on it and click on "Open".

The program interface indicating the location in the form of a tag.

Notebook

Notepad - Built-in Windows application to create text documents. It can also act as a role editor of certain formats.

    1. Run this software. To view the file you need to choose "Open" on the menu.

  1. Choose "All files" In the appropriate field. Having a desired object, click on "Open".

Visual display of the contents of the file in notepad.

We can say that expansion KML. It has small distribution, and is used exclusively in Google Earth, and viewing such a file through a notepad little to anyone will be useful.