Professional Documents
Culture Documents
Bent Hagemark
May 29, 2008
Overview
OGC Standard
KML Architecture
Advanced features
Future enhancement
OGC Standard
OGC KML 2.2
www.opengeospatial.org/standards/kml
schemas.opengis.net/kml/2.2.0/ogckml22.xsd
code.google.com/apis/kml
code.google.com/apis/kml/documentation/kmlreference.html
KML Architecture
KML Architecture
Object
Feature
Geometry
Style
Link
Extension mechanism
Object
Placemark
NetworkLink
Container: Document, Folder
Overlay: GroundOverlay, PhotoOverlay, ScreenOverlay
Geometry
2d or 3d
extrude
tessellate
kml:AbstractGeometryGroup (10.1)
Geometry: concrete elements
Point (icon)
LineString, LinearRing
Polygon
Model (textured 3d)
MultiGeometry
Style
Style
StyleMap
styleUrl
SubStyle: BalloonStyle, ListStyle, ColorStyle
ColorStyle: IconStyle, LabelStyle, LineStyle, PolyStyle
Link
href
network-shared style
network-shared schema
images, 3d models, more KML
balloon
ascription
Link: concrete elements
NetworkLink/Link/href
Overlay/Icon/href
Model/Link/href
styleUrl
schemaUrl
html:img src="..."
html:a href="..."
atom:link
Extension mechanism
ExtendedData/Data
Document/Schema, ExtendedData/SchemaData
ExtendedData/XML
XSD extension mechanism
XML and JavaScript
Placemark
Overlay
Folder
Style
NetworkLink
Advanced features
Region
Time
Update
ExtendedData
Region
Feature LOD
visibility transitions
millions of points
SuperOverlay
Region: any Feature
Placemark: visibility
NetworkLink: fetch
Overlay: fetch of image and visibility
Document/Folder: cascade
Region: simple effects
simple Lod
pop in and out
fade
clean swap with fade
Region: Example 1: simple Lod
<Placemark>
<Region>
<Lod>
<minLodPixels>128</minLodPixels>
</Lod>
<LatLonAltBox>...</LatLonAltBox>
</Region>
<Point>...</Point>
</Placemark>
Region: Example 2: pop in and out
<Placemark>
<Region>
<Lod>
<minLodPixels>128</minLodPixels>
<maxLodPixels>512</maxLodPixels>
</Lod>
<LatLonAltBox>...</LatLonAltBox>
</Region>
<Point>...</Point>
</Placemark>
Region: Example 3: clean swap
<Placemark id="coarse">
<Region>
<Lod> <!-- minLodPixels defaults to 0 -->
<maxLodPixels>256</maxLodPixels>
</Lod>
<LatLonAltBox>...</LatLonAltBox>
</Region>
</Placemark>
Region: Example 3: clean swap
<Placemark id="fine">
<Region>
<Lod>
<minLodPixels>256</minLodPixels>
</Lod> <!-- maxLodPixels defaults to -1 "infinite" -->
<LatLonAltBox>...</LatLonAltBox>
</Region>
</Placemark>
Region: NetworkLink
<NetworkLink>
<Region>
<Lod>
<minLodPixels>256</minLodPixels>
</Lod>
<LatLonAltBox>...</LatLonAltBox>
</Region>
<Link>
<href>load-when-viewer-close-enough.kml</href>
<viewRefreshMode>onRegion</viewRefreshMode>
</Link>
</NetworkLink>
Region: "RbNL" and tools
"RbNL" of GroundOverlays
Examples:
Google Earth Weather
disaster imagery
Region: tips and tricks
Feature
TimeStamp
TimeSpan
Example: Google Earth Weather
Time: tips and tricks
Change
Create
Delete
Example: Santa
Update: Change
<kml><NetworkLinkControl>
<Update>
<Change>
<Placemark targetId="p1">
<name>Point @ 3,-4.2</name>
<Point>
<coordinates>3,4.2</coordinates>
</Point>
</Placemark>
</Change>
</Update>
</NetworkLinkControl>
</kml>
Update: NetworkLinkControl and cookie
<kml><NetworkLinkControl>
<!-- name=value compat with cgi parsing -->
<cookie>count=123</cookie>
<Update>
<Change>
<Placemark targetId="p1">
<Point>
<coordinates>[coords for 123]</coordinates>
</Point>
</Placemark>
</Change>
</Update>
</NetworkLinkControl></kml>
ExtendedData
Feature
Data: untyped data
Schema and SchemaData: typed data
"<xs:any>": any XML
balloon templating with shared style
Example: Google Earth Weather
(Metadata deprecated)
ExtendedData: Example: Weather
<Placemark>
<name>...</name>
<styleUrl>http://.../style.kml#sunny</styleUrl>
<ExtendedData>...</ExtendedData>
<Point>...</Point>
</Placemark>
ExtendedData: Example: Weather
<ExtendedData>
<Data name="location">
<value>Shillong, IN as of 2008-05-28 17:00</value>
</Data>
<Data name="00_Temperature">
<value>80°F / 27°C</value>
</Data>
<Data name="00_Phrase">
<value>Haze</value>
</Data>
</ExtendedData>
ExtendedData: Example: weather
Feature
Data: untyped data
Schema and SchemaData: typed data
"<xs:any>": any XML
balloon templating with shared style
Example: Google Earth Weather
(Metadata deprecated)
ExtendedData: tips and tricks
ExtendedData/Data
the comment trick
Future enhancement
Future enhancement
ExtendedData
XSD extension mechanism
OGC SWG
Demo
code.google.com/apis/kml