KML: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(added stuff)
(added some stuff, should be ready enough)
 
Line 1: Line 1:
{{encyclopedia|moderator=Juha Villman}}
{{encyclopedia|moderator=Juha Villman}}
KML (Keyhole Markup Language) is an XML-based markup language which is used to display geographic data<ref name="google">http://code.google.com/apis/kml/documentation/kml_tut.html</ref>. Data is divided into nested elements and attributes. KML was originally developed by [[:en:Keyhole,_Inc|Keyhole Inc]] but Google acquired it in 2004. <ref name="wiki">[[:en:Keyhole Markup Language]]</ref>. Most commonly KML is used in [[:en:Google Earth|Google Earth]].
KML (Keyhole Markup Language) is an XML-based markup language which is used to display geographic data<ref name="google">http://code.google.com/apis/kml/documentation/kml_tut.html</ref>. Coordinates in KML are used in 3D form (longitude, latitude and altitude). Data is divided into nested elements and attributes. KML was originally developed by [[:en:Keyhole,_Inc|Keyhole Inc]] but Google acquired it in 2004. <ref name="wiki">[[:en:Keyhole Markup Language]]</ref>. Most commonly KML is used in [[:en:Google Earth|Google Earth]]. KML is also approved as Open Geospatial Consortium standard<ref>http://www.opengeospatial.org/standards/kml/</ref>.


This an example of KML syntax which shows a view of city of Kuopio in Finland:
This an example of KML syntax which shows a view of city of Kuopio in Finland:
Line 30: Line 30:
As seen from the example KML can contain much more information than just longitude and latitude. Coordinates inside <Point> -tags defines position of Placemark's name and icon. In addition to that coordinates inside <LookAt> -tags tells to user's browser where to position the camera view.   
As seen from the example KML can contain much more information than just longitude and latitude. Coordinates inside <Point> -tags defines position of Placemark's name and icon. In addition to that coordinates inside <LookAt> -tags tells to user's browser where to position the camera view.   
In general understanding KML is not very difficult if one has basic understanding of [[:en:XML|XML]].  
In general understanding KML is not very difficult if one has basic understanding of [[:en:XML|XML]].  
<ref>http://www.opengeospatial.org/standards/kml/</ref>


==References==
==References==


<references/>
<references/>

Latest revision as of 07:38, 5 August 2009

KML (Keyhole Markup Language) is an XML-based markup language which is used to display geographic data[1]. Coordinates in KML are used in 3D form (longitude, latitude and altitude). Data is divided into nested elements and attributes. KML was originally developed by Keyhole Inc but Google acquired it in 2004. [2]. Most commonly KML is used in Google Earth. KML is also approved as Open Geospatial Consortium standard[3].

This an example of KML syntax which shows a view of city of Kuopio in Finland:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" 
xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Placemark>
	<name>Kuopio, Suomi</name>
	<open>1</open>
	<address>Kuopio, Suomi</address>
	<LookAt>
		<longitude>27.679328</longitude>
		<latitude>62.893334</latitude>
		<altitude>0</altitude>
		<range>42529.324219</range>
		<tilt>0</tilt>
		<heading>0</heading>
	</LookAt>
	<styleUrl>http://maps.google.com:80/maps?q=Kuopio&sll=63.9916,25.9735&sspn=98.3031,360&
output=kml&ie=utf-8&v=2.2&cv=5.0.11733.9347&hl=fi#default+
nicon=http://maps.google.com/mapfiles/kml/pal3/icon60.png+hicon=http://maps.google.com/mapfiles/kml/pal3/icon52.png</styleUrl>
	<Point>
		<coordinates>27.679328,62.893334,0</coordinates>
	</Point>
</Placemark>
</kml>

As seen from the example KML can contain much more information than just longitude and latitude. Coordinates inside <Point> -tags defines position of Placemark's name and icon. In addition to that coordinates inside <LookAt> -tags tells to user's browser where to position the camera view. In general understanding KML is not very difficult if one has basic understanding of XML.

References