ConceptioArchiveOpen Geospatial Consortium (OGC)
Open Geospatial Consortium (OGC)open access

OGC KML (version 2.2) — OGC 07-147r2

Open Geospatial Consortium · Open Geospatial Consortium (OGC)
Open Geospatial Consortium (OGC) · Standards · License: Open Access
Open Source ↗Direct PDF ↓
geospatialkmlogcogc07ogckmlopengeospatialconsortium
ogc, geospatial, standard, open geospatial consortium, kml, ogc kml, 07-147r2, ogc 07-147r2, 2.2

OGC 07-147r2

Open Geospatial Consortium Inc. Date: 2008-04-14 Reference number of this OGC® project document: OGC 07-147r2 Version: 2.2.0 Category: OGC® Standard Editor: Tim Wilson

OGC® KML

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved. To obtain additional rights of use, visit http://www.opengeospatial.org/legal/.

Document type:

OGC® Standard

Document subtype:

Encoding

Document stage:

OGC® Standard

Document language:

English

License Agreement Permission is hereby granted by the Open Geospatial Consortium, ("Licensor"), free of charge and subject to the terms set forth below, to any person obtaining a copy of this Intellectual Property and any associated documentation, to deal in the Intellectual Property without restriction (except as set forth below), including without limitation the rights to implement, use, copy, modify, merge, publish, distribute, and/or sublicense copies of the Intellectual Property, and to permit persons to whom the Intellectual Property is furnished to do so, provided that all copyright notices on the intellectual property are retained intact and that each person to whom the Intellectual Property is furnished agrees to the terms of this Agreement. If you modify the Intellectual Property, all copies of the modified Intellectual Property must include, in addition to the above copyright notice, a notice that the Intellectual Property includes modifications that have not been approved or adopted by LICENSOR. THIS LICENSE IS A COPYRIGHT LICENSE ONLY, AND DOES NOT CONVEY ANY RIGHTS UNDER ANY PATENTS THAT MAY BE IN FORCE ANYWHERE IN THE WORLD. THE INTELLECTUAL PROPERTY IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE DO NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE INTELLECTUAL PROPERTY WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE INTELLECTUAL PROPERTY WILL BE UNINTERRUPTED OR ERROR FREE. ANY USE OF THE INTELLECTUAL PROPERTY SHALL BE MADE ENTIRELY AT THE USER’S OWN RISK. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ANY CONTRIBUTOR OF INTELLECTUAL PROPERTY RIGHTS TO THE INTELLECTUAL PROPERTY BE LIABLE FOR ANY CLAIM, OR ANY DIRECT, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM ANY ALLEGED INFRINGEMENT OR ANY LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR UNDER ANY OTHER LEGAL THEORY, ARISING OUT OF OR IN CONNECTION WITH THE IMPLEMENTATION, USE, COMMERCIALIZATION OR PERFORMANCE OF THIS INTELLECTUAL PROPERTY. This license is effective until terminated. You may terminate it at any time by destroying the Intellectual Property together with all copies in any form. The license will also terminate if you fail to comply with any term or condition of this Agreement. Except as provided in the following sentence, no such termination of this license shall require the termination of any third party end-user sublicense to the Intellectual Property which is in force as of the date of notice of such termination. In addition, should the Intellectual Property, or the operation of the Intellectual Property, infringe, or in LICENSOR’s sole opinion be likely to infringe, any patent, copyright, trademark or other right of a third party, you agree that LICENSOR, in its sole discretion, may terminate this license without any compensation or liability to you, your licensees or any other party. You agree upon termination of any kind to destroy or cause to be destroyed the Intellectual Property together with all copies in any form, whether held by you or by any third party. Except as contained in this notice, the name of LICENSOR or of any other holder of a copyright in all or part of the Intellectual Property shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Intellectual Property without prior written authorization of LICENSOR or such copyright holder. LICENSOR is and shall at all times be the sole entity that may authorize you or any third party to use certification marks, trademarks or other special designations to indicate compliance with any LICENSOR standards or specifications. This Agreement is governed by the laws of the Commonwealth of Massachusetts. The application to this Agreement of the United Nations Convention on Contracts for the International Sale of Goods is hereby expressly excluded. In the event any provision of this Agreement shall be deemed unenforceable, void or invalid, such provision shall be modified so as to make it valid and enforceable, and as so modified the entire Agreement shall remain in full force and effect. No decision, action or inaction by LICENSOR shall be construed to be a waiver of any rights or remedies available to it. None of the Intellectual Property or underlying information or technology may be downloaded or otherwise exported or reexported in violation of U.S. export laws and regulations. In addition, you are responsible for complying with any local laws in your jurisdiction which may impact your right to import, export or use the Intellectual Property, and you represent that you have complied with any regulations or registration procedures required by applicable law to make this license enforceable

ii

Copyright © 2012 Open Geospatial Consortium

OGC 07-147r2

Preamble Google submitted KML (formerly Keyhole Markup Language) to the Open Geospatial Consortium (OGC) to be evolved within the OGC consensus process with the following goal: KML Version 2.2 will be an adopted OGC implementation standard. Future versions may be harmonized with relevant OGC standards that comprise the OGC standards baseline. There are four objectives for this standards work: •

That there be one international standard language for expressing geographic annotation and visualization on existing or future web-based online and mobile maps (2d) and earth browsers (3d).

That KML be aligned with international best practices and standards, thereby enabling greater uptake and interoperability of earth browser implementations.

That the OGC and Google will work collaboratively to insure that the KML implementer community is properly engaged in the process and that the KML community is kept informed of progress and issues.

That the OGC process will be used to insure proper life-cycle management of the KML Standard, including such issues as backwards compatibility.

The OGC has developed a broad Standards Baseline. Google and the OGC believe that having KML fit within that family will encourage broader implementation and greater interoperability and sharing of earth browser content and context. KML is an XML language focused on geographic visualization, including annotation of maps and images. Geographic visualization includes not only the presentation of graphical data on the globe, but also the control of the user's navigation in the sense of where to go and where to look. From this perspective, KML is complementary to most of the key existing OGC standards including GML (Geography Markup Language), WFS (Web Feature Service) and WMS (Web Map Service). Currently, KML 2.2 utilizes certain geometry elements derived from GML 2.1.2. These elements include point, line string, linear ring, and polygon. The OGC and Google have agreed that there can be additional harmonization of KML with GML (e.g. to use the same geometry representation) in the future. The Mass Market Geo Working Group (MMWG) in the OGC will establish such additional harmonization activities. OGC specifications such as Context and Styled Layer Descriptor (SLD) may be considered.

ii

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

Google initially submitted the KML 2.1 Reference Manual to the OGC. Carl Reed of OGC reformatted this manual into the OGC Best Practices Document Template. During the April 2007 Technical Committee meetings, the OGC membership approved the OGC 07-039r1 KML 2.1 OGC Best Practices Paper. During the June 2007 Technical Committee meeting the MMWG approved updating this document to KML 2.2 and adding informative text to further describe the KML coordinate reference system (CRS) and geometry models. Google and Galdos Systems Inc. updated the document as such and submitted the resultant OGC 07-113r1 KML 2.2 – An OGC Best Practice document for approval by the OGC Technical Committee at the September 2007 TC Meeting. The OGC 07-113r1 document was subsequently approved by unanimous consent of the TC at this meeting. The approved OGC 07-113r1 document served as the basis for the OGC 07-147 KML 2.2 RFC Submission and OGC 07-134 KML 2.2 – Abstract Test Suite documents that were submitted to the OGC by Google and Galdos Systems Inc. in November 2008. These documents were reviewed by the OGC KML 2.2 Standards Working Group (SWG) and approved for an OGC 30-day Request For Comment public review period. Comments received by the OGC were then addressed by the KML 2.2 SWG, resulting in this OGC® Standard document and its companion OGC 07-134r2 KML 2.2 – Abstract Test Suite document.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

iii

OGC 07-147r2

Contents i.

Preface................................................................................................................. xiv

ii.

Submitting organizations .................................................................................. xiv

iii.

Submission contact points ................................................................................. xiv

iv.

Revision history....................................................................................................xv

v.

Changes to the OGC® Abstract Specification ................................................ xvi

Foreword........................................................................................................................ xvii Introduction.................................................................................................................. xviii OGC® KML.......................................................................................................................1 1

Scope........................................................................................................................1

2 2.1 2.2 2.2.1 2.2.2

Conformance ..........................................................................................................2 Conformance requirements ..................................................................................2 Application Profiles ...............................................................................................2 Introduction.........................................................................................................2 Rules for Authoring KML Application Profiles ..............................................2

3

Normative references.............................................................................................3

4 4.1 4.2

Terms and symbols ................................................................................................4 Terms and definitions ............................................................................................4 Acronyms (and abbreviated terms)......................................................................9

5 5.1 5.2 5.3 5.4 5.5 5.6

Conventions ..........................................................................................................11 UML Notation ......................................................................................................11 XML Namespaces ................................................................................................11 XML Schema........................................................................................................11 Versioning.............................................................................................................11 Deprecated parts of previous versions of KML ................................................12 Documentation .....................................................................................................12

6 6.1 6.2 6.3 6.3.1 6.3.2 6.3.3 6.3.4 6.4

KML Model Overview.........................................................................................13 KML Architecture ...............................................................................................13 Coordinate Reference System.............................................................................14 Geometry Interpolation for 3D Earth Browsers...............................................15 Interpolated Points............................................................................................15 kml:LineString and kml:LinearRing..............................................................15 kml:Polygon.......................................................................................................18 kml:GroundOverlay and kml:Region.............................................................21 Shared Styles ........................................................................................................23

iv

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

6.5 Entity Replacement..............................................................................................24 6.6 Extension Model...................................................................................................25 6.6.1 Introduction.......................................................................................................25 6.6.2 Extension by Inheritance..................................................................................25 6.6.3 Extension by Composition................................................................................26 7 7.1 7.1.1 7.1.2 7.1.3 7.1.4 7.1.5

Root Element ........................................................................................................27 kml.........................................................................................................................27 Structure ............................................................................................................27 Description.........................................................................................................27 Content...............................................................................................................27 Attributes ...........................................................................................................28 Example .............................................................................................................28

8 8.1 8.1.1 8.1.2 8.1.3

Object ....................................................................................................................29 kml:AbstractObjectGroup..................................................................................29 Structure ............................................................................................................29 Description.........................................................................................................29 Attributes ...........................................................................................................30

9 9.1 9.1.1 9.1.2 9.1.3 9.1.4 9.2 9.2.1 9.2.2 9.2.3 9.3 9.3.1 9.3.2 9.3.3 9.3.4 9.3.5 9.4 9.4.1 9.4.2 9.4.3 9.4.4 9.5 9.5.1 9.5.2 9.5.3 9.5.4 9.5.5

Features.................................................................................................................32 kml:AbstractFeatureGroup ................................................................................32 Structure ............................................................................................................32 Description.........................................................................................................32 Content...............................................................................................................33 Examples............................................................................................................39 kml:ExtendedData ...............................................................................................41 Structure ............................................................................................................41 Description.........................................................................................................41 Content...............................................................................................................42 kml:Data ...............................................................................................................43 Structure ............................................................................................................43 Description.........................................................................................................43 Content...............................................................................................................44 Attributes ...........................................................................................................44 Example .............................................................................................................45 kml:SchemaData ..................................................................................................45 Structure ............................................................................................................45 Description.........................................................................................................45 Content...............................................................................................................45 Attributes ...........................................................................................................46 kml:SimpleData....................................................................................................47 Structure ............................................................................................................47 Description.........................................................................................................47 Content...............................................................................................................47 Attributes ...........................................................................................................47 Example .............................................................................................................47

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

v

OGC 07-147r2

9.6 kml:AbstractContainerGroup ............................................................................49 9.6.1 Structure ............................................................................................................49 9.6.2 Description.........................................................................................................50 9.6.3 Content...............................................................................................................50 9.7 kml:Document ......................................................................................................51 9.7.1 Structure ............................................................................................................51 9.7.2 Description.........................................................................................................51 9.7.3 Content...............................................................................................................52 9.8 kml:Schema ..........................................................................................................52 9.8.1 Structure ............................................................................................................52 9.8.2 Description.........................................................................................................52 9.8.3 Content...............................................................................................................52 9.8.4 Attributes ...........................................................................................................53 9.8.5 Example .............................................................................................................54 9.9 kml:SimpleField ...................................................................................................54 9.9.1 Structure ............................................................................................................54 9.9.2 Description.........................................................................................................54 9.9.3 Content...............................................................................................................54 9.9.4 Attributes ...........................................................................................................55 9.10 kml:Folder ............................................................................................................56 9.10.1 Structure ............................................................................................................56 9.10.2 Description.........................................................................................................56 9.10.3 Content...............................................................................................................57 9.10.4 Example .............................................................................................................58 9.11 kml:Placemark .....................................................................................................58 9.11.1 Structure ............................................................................................................58 9.11.2 Description.........................................................................................................59 9.11.3 Content...............................................................................................................59 9.11.4 Example .............................................................................................................60 9.12 kml:NetworkLink ................................................................................................61 9.12.1 Structure ............................................................................................................61 9.12.2 Description.........................................................................................................61 9.12.3 Content...............................................................................................................62 9.12.4 Example .............................................................................................................63 9.13 kml:Region............................................................................................................63 9.13.1 Structure ............................................................................................................63 9.13.2 Description.........................................................................................................63 9.13.3 Content...............................................................................................................64 9.13.4 Example .............................................................................................................65 9.14 kml:AbstractLatLonAltBox................................................................................65 9.14.1 Structure ............................................................................................................65 9.14.2 Description.........................................................................................................65 9.14.3 Content...............................................................................................................66 9.15 kml:LatLonAltBox...............................................................................................68 9.15.1 Structure ............................................................................................................68

vi

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

9.15.2 Description.........................................................................................................68 9.15.3 Content...............................................................................................................69 9.15.4 Example .............................................................................................................70 9.16 kml:altitudeModeGroup .....................................................................................70 9.16.1 Structure ............................................................................................................70 9.16.2 Description.........................................................................................................70 9.16.3 Content...............................................................................................................70 9.17 kml:altitudeMode.................................................................................................70 9.17.1 Structure ............................................................................................................70 9.17.2 Description.........................................................................................................70 9.17.3 Content...............................................................................................................71 9.18 kml:Lod.................................................................................................................71 9.18.1 Structure ............................................................................................................71 9.18.2 Description.........................................................................................................71 9.18.3 Content...............................................................................................................73 9.18.4 Example .............................................................................................................74 10 Geometries ............................................................................................................75 10.1 kml:AbstractGeometryGroup ............................................................................75 10.1.1 Structure ............................................................................................................75 10.1.2 Description.........................................................................................................75 10.1.3 Content...............................................................................................................75 10.2 kml:MultiGeometry.............................................................................................76 10.2.1 Structure ............................................................................................................76 10.2.2 Description.........................................................................................................76 10.2.3 Content...............................................................................................................76 10.2.4 Example .............................................................................................................77 10.3 kml:Point ..............................................................................................................77 10.3.1 Structure ............................................................................................................77 10.3.2 Description.........................................................................................................77 10.3.3 Content...............................................................................................................78 10.3.4 Example .............................................................................................................79 10.4 kml:extrude ..........................................................................................................79 10.5 kml:LinearRing....................................................................................................80 10.5.1 Structure ............................................................................................................80 10.5.2 Description.........................................................................................................80 10.5.3 Content...............................................................................................................80 10.5.4 Example .............................................................................................................82 10.6 kml:tessellate ........................................................................................................82 10.6.1 Structure ............................................................................................................82 10.6.2 Description.........................................................................................................82 10.6.3 Content...............................................................................................................82 10.7 kml:LineString .....................................................................................................83 10.7.1 Structure ............................................................................................................83 10.7.2 Description.........................................................................................................83 10.7.3 Content...............................................................................................................83

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

vii

OGC 07-147r2

10.7.4 Example .............................................................................................................85 10.8 kml:Polygon..........................................................................................................85 10.8.1 Structure ............................................................................................................85 10.8.2 Description.........................................................................................................86 10.8.3 Content...............................................................................................................86 10.8.4 Example .............................................................................................................88 10.9 kml:Model.............................................................................................................88 10.9.1 Structure ............................................................................................................88 10.9.2 Description.........................................................................................................89 10.9.3 Content...............................................................................................................91 10.9.4 Example .............................................................................................................93 10.10 kml:Location ........................................................................................................93 10.10.1 Structure ............................................................................................................93 10.10.2 Description.........................................................................................................94 10.10.3 Content...............................................................................................................94 10.10.4 Example .............................................................................................................95 10.11 kml:Orientation....................................................................................................95 10.11.1 Structure ............................................................................................................95 10.11.2 Description.........................................................................................................95 10.11.3 Content...............................................................................................................96 10.11.4 Defining Orientation.........................................................................................97 10.11.5 Example .............................................................................................................98 10.12 kml:Scale...............................................................................................................98 10.12.1 Structure ............................................................................................................98 10.12.2 Description.........................................................................................................98 10.12.3 Content...............................................................................................................98 10.12.4 Example ...........................................................................................................100 10.13 kml:ResourceMap..............................................................................................100 10.13.1 Structure ..........................................................................................................100 10.13.2 Description.......................................................................................................100 10.13.3 Content.............................................................................................................100 10.14 kml:Alias.............................................................................................................101 10.14.1 Structure ..........................................................................................................101 10.14.2 Description.......................................................................................................101 10.14.3 Content.............................................................................................................101 10.14.4 Example ...........................................................................................................102 11 Overlays ..............................................................................................................103 11.1 kml:AbstractOverlayGroup..............................................................................103 11.1.1 Structure ..........................................................................................................103 11.1.2 Description.......................................................................................................103 11.1.3 Content.............................................................................................................104 11.2 kml:GroundOverlay ..........................................................................................106 11.2.1 Structure ..........................................................................................................106 11.2.2 Description.......................................................................................................106 11.2.3 Content.............................................................................................................107

viii

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

11.2.4 Example ...........................................................................................................108 11.3 kml:LatLonBox ..................................................................................................108 11.3.1 Structure ..........................................................................................................108 11.3.2 Description.......................................................................................................108 11.3.3 Content.............................................................................................................109 11.3.4 Example ...........................................................................................................110 11.4 kml:PhotoOverlay..............................................................................................110 11.4.1 Structure ..........................................................................................................110 11.4.2 Description.......................................................................................................111 11.4.3 Handling large images ....................................................................................112 11.4.4 Content.............................................................................................................113 11.4.5 Example ...........................................................................................................115 11.5 kml:ViewVolume................................................................................................115 11.5.1 Structure ..........................................................................................................115 11.5.2 Description.......................................................................................................115 11.5.3 Content.............................................................................................................116 11.6 kml:ImagePyramid ............................................................................................118 11.6.1 Structure ..........................................................................................................118 11.6.2 Description.......................................................................................................118 11.6.3 Creating an Image Pyramid...........................................................................118 11.6.4 Transparency...................................................................................................120 11.6.5 Content.............................................................................................................120 11.7 kml:ScreenOverlay ............................................................................................122 11.7.1 Structure ..........................................................................................................122 11.7.2 Description.......................................................................................................122 11.7.3 Content.............................................................................................................123 11.7.4 Examples..........................................................................................................125 12 Styles....................................................................................................................127 12.1 kml:AbstractStyleSelectorGroup .....................................................................127 12.1.1 Structure ..........................................................................................................127 12.1.2 Description.......................................................................................................127 12.1.3 Content.............................................................................................................127 12.2 kml:Style .............................................................................................................128 12.2.1 Structure ..........................................................................................................128 12.2.2 Description.......................................................................................................128 12.2.3 Content.............................................................................................................128 12.2.4 Example ...........................................................................................................130 12.3 kml:StyleMap .....................................................................................................130 12.3.1 Structure ..........................................................................................................130 12.3.2 Description.......................................................................................................131 12.3.3 Content.............................................................................................................131 12.3.4 Example ...........................................................................................................132 12.4 kml:Pair ..............................................................................................................132 12.4.1 Structure ..........................................................................................................132 12.4.2 Description.......................................................................................................133

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

ix

OGC 07-147r2

12.4.3 Content.............................................................................................................133 12.4.4 Example ...........................................................................................................134 12.5 kml:AbstractSubStyleGroup ............................................................................134 12.5.1 Structure ..........................................................................................................134 12.5.2 Description.......................................................................................................134 12.5.3 Content.............................................................................................................134 12.6 kml:BalloonStyle ................................................................................................135 12.6.1 Structure ..........................................................................................................135 12.6.2 Description.......................................................................................................135 12.6.3 Content.............................................................................................................135 12.6.4 Example ...........................................................................................................138 12.7 kml:AbstractColorStyleGroup .........................................................................138 12.7.1 Structure ..........................................................................................................138 12.7.2 Description.......................................................................................................139 12.7.3 Content.............................................................................................................139 12.8 kml:IconStyle......................................................................................................140 12.8.1 Structure ..........................................................................................................140 12.8.2 Description.......................................................................................................140 12.8.3 Content.............................................................................................................141 12.8.4 Example ...........................................................................................................142 12.9 kml:Icon (kml:BasicLinkType) ........................................................................142 12.9.1 Structure ..........................................................................................................142 12.9.2 Description.......................................................................................................142 12.9.3 Content.............................................................................................................143 12.10 kml:LabelStyle ...................................................................................................144 12.10.1 Structure ..........................................................................................................144 12.10.2 Description.......................................................................................................144 12.10.3 Content.............................................................................................................144 12.10.4 Example ...........................................................................................................145 12.11 kml:LineStyle .....................................................................................................145 12.11.1 Structure ..........................................................................................................145 12.11.2 Description.......................................................................................................145 12.11.3 Content.............................................................................................................146 12.11.4 Example ...........................................................................................................147 12.12 kml:PolyStyle......................................................................................................147 12.12.1 Structure ..........................................................................................................147 12.12.2 Description.......................................................................................................147 12.12.3 Content.............................................................................................................148 12.12.4 Example ...........................................................................................................149 12.13 kml:ListStyle ......................................................................................................149 12.13.1 Structure ..........................................................................................................149 12.13.2 Description.......................................................................................................150 12.13.3 Content.............................................................................................................150 12.13.4 Example ...........................................................................................................152 12.14 kml:ItemIcon ......................................................................................................153

x

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

12.14.1 Structure ..........................................................................................................153 12.14.2 Description.......................................................................................................153 12.14.3 Content.............................................................................................................154 13 Links....................................................................................................................156 13.1 kml:Link, kml:Icon (kml:LinkType) ...............................................................156 13.1.1 Structure ..........................................................................................................156 13.1.2 Description.......................................................................................................156 13.1.3 Content.............................................................................................................157 13.1.4 Example ...........................................................................................................161 13.2 kml:NetworkLinkControl .................................................................................161 13.2.1 Structure ..........................................................................................................161 13.2.2 Description.......................................................................................................161 13.2.3 Content.............................................................................................................162 13.2.4 Example ...........................................................................................................165 13.3 kml:Update .........................................................................................................165 13.3.1 Structure ..........................................................................................................165 13.3.2 Description.......................................................................................................165 13.3.3 Content.............................................................................................................166 13.4 kml:Create ..........................................................................................................167 13.4.1 Structure ..........................................................................................................167 13.4.2 Description.......................................................................................................167 13.4.3 Content.............................................................................................................167 13.4.4 Example ...........................................................................................................167 13.5 kml:Delete...........................................................................................................168 13.5.1 Structure ..........................................................................................................168 13.5.2 Description.......................................................................................................168 13.5.3 Content.............................................................................................................168 13.5.4 Example ...........................................................................................................168 13.6 kml:Change ........................................................................................................169 13.6.1 Structure ..........................................................................................................169 13.6.2 Description.......................................................................................................169 13.6.3 Content.............................................................................................................169 13.6.4 Example ...........................................................................................................170 14 Views ...................................................................................................................171 14.1 kml:AbstractViewGroup...................................................................................171 14.1.1 Structure ..........................................................................................................171 14.1.2 Description.......................................................................................................171 14.1.3 Content.............................................................................................................171 14.2 kml:Camera........................................................................................................172 14.2.1 Structure ..........................................................................................................172 14.2.2 Description.......................................................................................................172 14.2.3 Defining a View ...............................................................................................172 14.2.4 Order of Rotation............................................................................................174 14.2.5 Content.............................................................................................................176

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

xi

OGC 07-147r2

14.3 kml:LookAt ........................................................................................................179 14.3.1 Structure ..........................................................................................................179 14.3.2 Description.......................................................................................................179 14.3.3 Defining How to Look.....................................................................................180 14.3.4 Content.............................................................................................................181 14.3.5 Example ...........................................................................................................183 15 Time.....................................................................................................................184 15.1 kml:AbstractTimePrimitiveGroup ..................................................................184 15.1.1 Structure ..........................................................................................................184 15.1.2 Description.......................................................................................................184 15.1.3 Content.............................................................................................................184 15.2 kml:TimeSpan ....................................................................................................185 15.2.1 Structure ..........................................................................................................185 15.2.2 Description.......................................................................................................185 15.2.3 Content.............................................................................................................185 15.2.4 Example ...........................................................................................................186 15.3 kml:TimeStamp..................................................................................................187 15.3.1 Structure ..........................................................................................................187 15.3.2 Description.......................................................................................................187 15.3.3 Content.............................................................................................................187 16 Field Types..........................................................................................................189 16.1 kml:altitudeModeEnumType............................................................................189 16.1.1 Content.............................................................................................................189 16.2 kml:angle180Type..............................................................................................189 16.2.1 Content.............................................................................................................189 16.3 kml:angle360Type..............................................................................................189 16.3.1 Content.............................................................................................................189 16.4 kml:angle90Type................................................................................................189 16.4.1 Content.............................................................................................................189 16.5 kml:anglepos180Type ........................................................................................189 16.5.1 Content.............................................................................................................189 16.6 kml:anglepos90Type ..........................................................................................190 16.6.1 Content.............................................................................................................190 16.7 kml:colorModeEnumType ................................................................................190 16.7.1 Description.......................................................................................................190 16.7.2 Content.............................................................................................................190 16.8 kml:colorType ....................................................................................................190 16.8.1 Description.......................................................................................................190 16.8.2 Content.............................................................................................................191 16.9 kml:coordinatesType .........................................................................................191 16.9.1 Description.......................................................................................................191 16.9.2 Content.............................................................................................................191 16.10 kml:dateTimeType.............................................................................................191 16.10.1 Content.............................................................................................................191

xii

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

16.11 kml:displayModeEnumType ............................................................................191 16.11.1 Content.............................................................................................................191 16.12 kml:gridOriginEnumType ................................................................................192 16.12.1 Content.............................................................................................................192 16.13 kml:itemIconStateEnumType...........................................................................192 16.13.1 Description.......................................................................................................192 16.13.2 Content.............................................................................................................192 16.14 kml:itemIconStateType .....................................................................................192 16.14.1 Content.............................................................................................................192 16.15 kml:listItemTypeEnumType.............................................................................192 16.15.1 Description.......................................................................................................192 16.15.2 Content.............................................................................................................193 16.16 kml:refreshModeEnumType ............................................................................193 16.16.1 Content.............................................................................................................193 16.17 kml:shapeEnumType.........................................................................................193 16.17.1 Content.............................................................................................................193 16.18 kml:styleStateEnumType ..................................................................................194 16.18.1 Content.............................................................................................................194 16.19 kml:SnippetType................................................................................................194 16.19.1 Content.............................................................................................................194 16.19.2 Attributes .........................................................................................................194 16.20 kml:unitsEnumType ..........................................................................................194 16.20.1 Description.......................................................................................................194 16.20.2 Content.............................................................................................................194 16.21 kml:vec2Type .....................................................................................................195 16.21.1 Structure ..........................................................................................................195 16.21.2 Description.......................................................................................................195 16.21.3 Attributes .........................................................................................................195 16.22 kml:viewRefreshModeEnumType....................................................................196 16.22.1 Content.............................................................................................................196 Annex A (normative) KML Schemas..........................................................................197 Annex B (normative) KML Coordinate Reference System Definition ....................231 Bibliography ...................................................................................................................233

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

xiii

OGC 07-147r2

i.

Preface

This is an OGC® Standard for encoding representations of geographic data for display in an earth browser.

Suggested additions, changes, and comments on this draft report are welcome and encouraged. Such suggestions may be submitted by email message or by making suggested changes in an edited copy of this document.

ii.

Submitting organizations

The following organizations submitted this Standard to the Open Geospatial Consortium Inc.: a) Google, Inc. b) Galdos Systems Inc.

iii.

Submission contact points

All questions regarding this submission should be directed to the editor or submitters: CONTACT

xiv

COMPANY

EMAIL

Tim Wilson

Galdos Systems Inc.

twilson at galdosinc.com

David Burggraf

Galdos Systems Inc.

dburggraf at galdosinc.com

Ron Lake

Galdos Systems Inc.

rlake at galdosinc.com

Susan Patch

Galdos Systems Inc.

spatch at galdosinc.com

Richard Martell

Galdos Systems Inc.

rmartell at galdosinc.com

Brian McClendon

Google, Inc.

bam at google.com

Michael Jones

Google, Inc.

mtj at google.com

Michael Ashbridge

Google, Inc.

mashbridge at google.com

Bent Hagemark

Google, Inc.

bent at google.com

Josie Wernecke

Google, Inc.

josiew at google.com

Carl Reed

Open Geospatial Consortium

creed at opengeospatial.org

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

iv.

Revision history Date

Release

Author

Paragraph modified

Description

3-7-06

0.0.5

Carl Reed

New

Initial Version

4/17/07

0.0.9

Carl Reed

Various

Updates based on comments received during Mass Market GEO WG meeting as well as a request from Google to remove 3 elements.

5/2/07

0.0.9

Carl Reed

Various

Add preamble and edit document for posting as a BP.

8/1/07

0.0.10

Susan Patch

Various

Corrected all links to target within the document Modified text to include final Google KML 2.2 reference text.

8/29/07

0.0.11

Tim Wilson

Various

Modified text to describe KML in terms of generic earth browsers. Updated text and terminology to OGC 06-135r1 standards.

8/29/07

0.0.12

David Burggraf

Added Section 6, Added informative text describing the Annex A and KML coordinate reference system (CRS) various other and geometry models in terms of the edits. GML Geometry and Topic 2 (Spatial Referencing). Added GML CRS dictionary to Annex A. Note: Document number changed to 07-113 when submitted to OGC.

9/6/07

0.0.13

David Burggraf, Ron Lake, Tim Wilson, Susan Patch

Various

Modified text for clarity and consistency and to further describe KML in terms of generic earth browsers.

OGC terminology Adjusted OGC terminology for new OGC (TBD) policies.

New diagrams added to Section 6.

9/10/07

0.0.14

Carl Reed

9/11/07

0.0.14

Bent Hagemark, All Michael Ashbridge

Reviewed for errors and omissions.

9/12/07

0.0.14

David Burggraf

Section 6, geometry elements

Clarification of definitions.

9/12/07

0.0.14

Ron Lake

Camera, PhotoOverlay, Model

Clarification of definitions.

9/14/07

0.0.14

Susan Patch

All

Copy editing and application of OGC styles.

9/14/07

0.0.14

Tim Wilson

All

Corrected errors and improved terminology.

10/15/07

0.0.15

Bent Hagemark

KML Schema

Updated for extension model, changes to Google KML 2.2 beta schema.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

xv

OGC 07-147r2

Date

Release

Author

Paragraph modified

Description

10/29/07

0.0.15

Tim Wilson, Susan All Patch

Updated structure sections for revised KML 2.2. schema

10/29/07

0.0.15

Bent Hagemark, Richard Martell, Jeremy ParrPearson, Tim Wilson

Update assertions corresponding to OGC 07-134 KML 2.2 – Abstract Test Suite

10/29/07

0.0.15

Bent Hagemark, PhotoOverlay, Michael Ashbridge, ImagePyramid Josie Wernecke

Text on handling and building large image pyramids.

11/02/07

0.0.15

David Burggraf

Section 6, PhotoOverlay

Clarifications.

11/03/07

0.0.15

Tim Wilson

Section 6

Extension mechanism and policy text.

11/04/07

0.0.15

Tim Wilson

All

General edit.

21/01/08

2.2.0-rc1

Tim Wilson

Metadata

Updated OGC document metadata for Candidate Standard release.

21/01/08

2.2.0-rc1

Tim Wilson

Annex A

Deprecated Metadata and Url elements maintained in OGC KML 2.2 schema for compatibility with Google KML 2.2 schema. Deprecation note added to all deprecated elements as xsd:annotation/xsd:documentation.

23/01/08

2.2.0-rc1

Tim Wilson

All

Copy edit; atom-author-link.xsd schema/version value changed to "1.0.0".

14/04/08

2.2.0

Tim Wilson

All

Updated OGC document metadata for Standard release. Minor errors corrected.

v.

All

Changes to the OGC® Abstract Specification

The OGC® Abstract Specification does not require changes to accommodate this OGC® Standard.

xvi

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

Foreword Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. The Open Geospatial Consortium Inc. shall not be held responsible for identifying any or all such patent rights. Recipients of this document are requested to submit, with their comments, notification of any relevant patent claims or other intellectual property rights of which they may be aware that might be infringed by any implementation of the standard set forth in this document, and to provide supporting documentation.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

xvii

OGC 07-147r2

Introduction KML is an XML grammar used to encode and transport representations of geographic data for display in an earth browser. Put simply: KML encodes what to show in an earth browser, and how to show it. KML uses a tag-based structure with nested elements and attributes and is based on the XML standard. The KML community is wide and varied. Casual users create KML Placemarks to identify their homes, describe journeys, and plan cross-country hikes and cycling ventures. Scientists use KML to provide detailed mappings of resources, models, and trends such as volcanic eruptions, weather patterns, earthquake activity, and mineral deposits. Real estate professionals, architects, and city development agencies use KML to propose construction and visualize plans. Students and teachers use KML to explore people, places, and events, both historic and current. Organizations such as National Geographic, UNESCO, and the Smithsonian have all used KML to display their rich sets of global data. KML documents and their related images (if any) may be compressed using the ZIP format into KMZ archives. KML documents and KMZ archives may be shared by e-mail, hosted locally for sharing within a private internet, or hosted on a web server.

xviii

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC® Standard

OGC 07-147r2

OGC® KML 1

Scope

KML is an XML grammar used to encode and transport representations of geographic data for display in an earth browser, such as a 3D virtual globe, 2D web browser application, or 2D mobile application. A KML instance is processed in much the same way that HTML (and XML) documents are processed by web browsers. Like HTML, KML has a tag-based structure with names and attributes used for specific display purposes. KML can be used to: •

Annotate the Earth

Specify icons and labels to identify locations on the surface of the planet

Create different camera positions to define unique views for KML features

Define image overlays to attach to the ground or screen

Define styles to specify KML feature appearance

Write HTML descriptions of KML features, including hyperlinks and embedded images

Organize KML features into hierarchies

Locate and update retrieved KML documents from local or remote network locations

Define the location and orientation of textured 3D objects

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

1

OGC 07-147r2

2

Conformance

2.1

Conformance requirements

A KML resource that conforms to this standard shall: a) satisfy all requirements stipulated in this document; b) be well-formed (as defined in the W3C XML 1.0 standard); c) pass all relevant test cases specified by the Abstract Test Suite (ATS) provided in OGC document 07-134r2.

2.2 2.2.1

Application Profiles Introduction

An application profile defines a set of elements derived from one or more base standards for the purpose of: •

promoting interoperability; and

meeting the requirements of a particular application domain.

2.2.2

Rules for Authoring KML Application Profiles

A KML profile can restrict or extend KML to the extent permitted by this standard. The KML schema provides a number of extension points that may be exploited in a profile. While a profile shall not contradict the standard, it may restrict the choice of options or introduce new elements (or do both). Documents that conform to the KML standard may contain elements and attributes that are not part of the standard but are defined in an application profile. Such elements and attributes—called foreign information items—must not reside within the KML namespace; they shall be placed in another namespace. Application profiles shall not redefine any KML components (structurally or semantically) within the KML namespace. Application profiles which extend KML shall: •

2

define the XML structure of any new elements and attributes in a valid application profile schema that imports the KML schema;

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

add new elements to existing concrete KML elements by substitution only, where permitted by the KML schema;

derive any new complex types of complex content directly or indirectly by extension from kml:AbstractObjectType;

derive any new complex types of complex content by extension from the relevant KML abstract type whose semantics it shares. EXAMPLE: a new feature type shall derive from kml:AbstractFeatureType.

declare any new elements and attributes as optional, i.e. minOccurs="0", to support the KML update mechanism. This however does not preclude asserting minimum occurrence constraints as conformance rules within supplementary normative application profile documentation.

Application profiles that extend KML should: •

place any extension elements and attributes in a "vendor-neutral" namespace to support any future potential integration with the KML standard, and encourage interoperability in general.

An adopted OGC application profile that extends KML should: •

be based on a source mass market application profile that is supported by running code;

preferably maintain or else deprecate the namespace of a source application profile from which it derives, if/where the source profile is in popular use within the mass market. This is to ensure backwards compatibility with existing instances and consumers of the source profile;

provide a structural and semantic mapping between any profile components which have changed from their original source profile.

Authors of application profiles are encouraged to submit their extensions to OGC for standardization. This does not preclude any resulting OGC application profile from being merged later into the KML standard.

3

Normative references

The following normative documents contain provisions that, through reference in this text, constitute provisions of this part of OGC 07-147r2. For dated references, subsequent amendments to, or revisions of, any of these publications do not apply; however, parties to agreements based on this part of OGC 07-147r2 are encouraged to investigate the possibility

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

3

OGC 07-147r2

of applying the most recent editions of the normative documents indicated below. For undated references, the latest edition of the normative document referred to applies. OGC 07-134r2, OGC KML 2.2 - Abstract Test Suite IETF RFC 4287, Atom Syndication Format. Available from: http://tools.ietf.org/html/rfc4287 OASIS Extensible Address Language (XAL) 2.0. Available from: http://www.oasisopen.org/committees/ciq/download.html IETF RFC 3966, The tel URI for Telephone Numbers. Available from: http://tools.ietf.org/html/rfc3966 ISO 8601:2004, Data elements and interchange formats — Information interchange — Representation of dates and times IETF RFC 3986, Uniform Resource Identifier (URI): Generic Syntax. Available from: http://tools.ietf.org/html/rfc3986 W3C HTML 4.01 Specification. Available from: http://www.w3.org/TR/html4/ W3C XHTML 1.0, The Extensible HyperText Markup Language. Available from: http://www.w3.org/TR/xhtml1/ W3C Extensible Markup Language (XML) 1.0. Available from: http://www.w3.org/TR/RECxml/ W3C Namespaces in XML 1.0. Available from: http://www.w3.org/TR/REC-xml-names/ W3C XML Schema Part 1: Structures. Available from: http://www.w3.org/TR/xmlschema-1/ W3C XML Schema Part 2: Datatypes. Available from: http://www.w3.org/TR/xmlschema-2/

4

Terms and symbols

4.1

Terms and definitions

For the purposes of this document, the following terms and definitions apply. 4.1.1 application schema conceptual schema for data required by one or more applications. [ISO 19101]

4

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

4.1.2 attribute <XML> name/value pair contained in an element NOTE:

In this document an attribute is an XML attribute unless otherwise specified

4.1.3 boundary set that represents the limit of an entity [ISO 19107] 4.1.4 bounding box minimum volume that encloses a set of objects or data points. 4.1.5 child element <XML> immediate descendant element 4.1.6 complex element <XML> element of complex content 4.1.7 coordinate one of a sequence of n numbers designating the position of a point in n-dimensional space [ISO 19111] NOTE:

In a coordinate reference system, the n numbers shall be qualified by units.

4.1.8 coordinate reference system coordinate system that is related to an object by a datum [ISO 19111]

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

5

OGC 07-147r2

4.1.9 coordinate system set of mathematical rules for specifying how coordinates are to be assigned to points [ISO 19111] 4.1.10 coordinate tuple tuple composed of a sequence of coordinates [ISO 19111] 4.1.11 data type specification of a value domain with operations allowed on values in this domain [ISO/TS 19103] EXAMPLE: NOTE:

integer, real, boolean, string, date (conversion of a data into a series of codes).

Data types include primitive predefined types and user-definable types. All instances of a data types lack identity.

4.1.12 datum parameter or set of parameters that define the position of the origin, the scale, and the orientation of a coordinate system [ISO 19111] NOTE:

A datum may be a geodetic datum, a vertical datum, an engineering datum, an image datum or a temporal datum.

4.1.13 document <XML> well-formed XML instance 4.1.14 earth browser software for displaying and annotating models of the Earth

6

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

4.1.15 element <XML> basic information item of an XML document containing child elements, attributes and character data NOTE:

From the XML Information Set: "Each XML document contains one or more elements, the boundaries of which are either delimited by start-tags and end-tags, or, for empty elements, by an empty-element tag. Each element has a type, identified by name, sometimes called its 'generic identifier' (GI), and may have a set of attribute specifications. Each attribute specification has a name and a value."

4.1.16 field child element of simple content 4.1.17 field type XML Schema simple type defined in the KML schema document 4.1.18 geodetic datum datum describing the relationship of a 2- or 3-dimensional coordinate system to the Earth [ISO 19111] 4.1.19 geographic view display of geographic KML elements 4.1.20 interior set of all points that are on a geometric object but which are not on its boundary 4.1.21 line string curve composed of straight-line segments 4.1.22 list view display of one or more hierarchies of KML Features

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

7

OGC 07-147r2

4.1.23 namespace <XML> collection of names, identified by a URI reference, which are used in XML documents as element names and attribute names [W3C XML Namespaces] 4.1.24 plate carrée projection A simple cylindrical projection in which the target plane has a horizontal axis representing longitude (standard parallel is the Equator) and vertical axis representing latitude. Otherwise known as equi-rectangular, plane chart, or unprojected map projection. 4.1.25 point 0-dimensional geometric primitive, representing a position [ISO 19107] NOTE:

The boundary of a point is the empty set.

4.1.26 polygon planar surface defined by 1 exterior boundary and 0 or more interior boundaries 4.1.27 resource network data object or service that is identified by a URL 4.1.28 schema formal description of a model [ISO 19101] NOTE:

In general, a schema is an abstract representation of an object's characteristics and relationship to other objects. An XML schema represents the relationship between the attributes and elements of an XML object (for example, a document or a portion of a document)

4.1.29 schema <XML Schema> collection of schema components within the same target namespace EXAMPLE: Schema components of W3C XML Schema are types, elements, attributes, groups, etc.

8

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

4.1.30 schema document <XML Schema> XML document containing schema component definitions and declarations NOTE:

The W3C XML Schema provides an XML interchange format for schema information. A single schema document provides descriptions of components associated with a single XML namespace, but several documents may describe components in the same schema, i.e. the same target namespace.

4.1.31 simple element <XML> element of simple content 4.1.32 tag <XML> markup in an XML document delimiting the content of an element NOTE:

A tag with no forward slash (e.g. <Placemark> ) is called a start-tag (also opening tag), and one with a forward slash (e.g. </Placemark> is called an end-tag (also closing tag).

4.1.33 tuple ordered list of values 4.1.34 Uniform Resource Identifier (URI) unique identifier for a resource, structured in conformance with IETF RFC 2396 NOTE:

4.2

The general syntax is <scheme>::<scheme-specific-part>. The hierarchical syntax with a namespace is <scheme>://<authority><path>?<query> – see [RFC 2396].

Acronyms (and abbreviated terms)

Some frequently used abbreviated terms: COTS

Commercial Off The Shelf

CRS

Coordinate Reference System

CS

Coordinate System

CSV

Comma Separated Values

CT

Coordinate Transformation

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

9

OGC 07-147r2

DTD

Document Type Definition

EPSG

European Petroleum Survey Group

GIS

Geographic Information System

GML

Geography Markup Language

NOTE:

The acronym GML was previously used in ISO also as Generalized Markup Language (which led to SGML Standard Generalized Markup Language, ISO 8879).

HTTP

Hypertext Transfer Protocol

IETF

Internet Engineering Task Force

ISO

International Organization for Standardization

KMZ

KML Archive File

OGC

Open Geospatial Consortium

RFC

Request for Comments

URI

Uniform Resource Identifier

URL

Uniform Resource Locator

URN

Uniform Resource Name

W3C

World Wide Web Consortium

xAL

eXtensible Address Language

XML

eXtended Markup Language

XSD

XML Schema Definition

0D

Zero Dimensional

1D

One Dimensional

2D

Two Dimensional

3D

Three Dimensional

10

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

5

5.1

Conventions

UML Notation

There is no UML associated with this Standard.

5.2

XML Namespaces

All components of the KML schema are defined in the namespace with the identifier "http://www.opengis.net/kml/2.2", for which the prefix kml or the default namespace is used within this Standard. The atom:author and atom:link components described by the Atom Syndication Format are defined in the namespace with the identifier "http://www.w3.org/2005/Atom", for which the prefix atom is used within this Standard. NOTE The schema components from these namespaces are documented in the XML Schema documents found in Annex A.

The xAL:AddressDetails component described by the eXtensible Address Language is defined in the namespace with the identifier "urn:oasis:names:tc:ciq:xsdschema:xAL:2.0", for which the prefix xAL is used within this OGC® Standard.

5.3

XML Schema

KML uses the W3C XML Schema language to describe the grammar of conformant KML data instances. The KML schema document is included in Annex A and forms a normative part of this OGC® Standard. The normative KML schema includes deprecated schema components that KML producers are advised to not use; they may be removed in a subsequent major revision.

5.4

Versioning

Each schema document specifying components of the KML schema shall carry a version attribute as defined in the XML Schema Recommendation. The format of the version attribute string is x.y.z where x denotes the major version number, y denotes a minor version number, and z denotes a bug fix release for that document. All versions with the same major version shall be compatible, except for any change in the version namespace. In practice this means that minor versions shall add optional content only.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

11

OGC 07-147r2

Major revisions shall maintain the highest level of achievable backwards compatibility to a previous release, except for any change in the version namespace.

5.5

Deprecated parts of previous versions of KML

The verb "deprecate" provides notice that the referenced portion of this Standard is being retained for backwards compatibility with earlier versions but may be removed from a subsequent major revision.

5.6

Documentation

Clauses 7 to 15 specify the content model for each KML element. The KML content model is defined in terms of child elements and attributes. Where a child element is defined in a separate subclause, a link is provided to it. Throughout this document, the following conventions are used:

12

Concrete element and attribute names used within the text are formatted in Courier New and abstract elements in Courier New Italic, except in the case of headings and references to them.

A value from an enumerated set is in bold.

Child element content is specified within the element subclause whose type declares such children.

The prefix "xsd:" is used to identify types that are defined by XML Schema, for example xsd:string.

The use of abstract substitution elements within the text refers to the concrete elements that substitute for them. For example, kml:AbstractContainerGroup refers to the kml:Document and kml:Folder elements that substitute for it. Element substitution is described for each element where applicable.

The term kml:Document is a KML element; the term "KML document" refers to an XML instance of KML.

Default values for simple elements are listed under relevant Content subclauses. Unless otherwise stated, default values for optional elements shall apply when such elements are empty or absent.

The term "KML resource" refers to a local or remote KML or KMZ instance.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

Each element subclause includes a XML structure section that shows the content model for the described element as a representative XML instance, using the following conventions: •

The minimum and maximum occurrence of elements and attributes required by its schema type are shown in square brackets, for example [0..1]. Such occurrence requirements are necessary but insufficient in that additional occurrence requirements are asserted within this OGC® Standard.

Elements are listed in the required document order.

Choice model group information is represented by "Start Choice ... End Choice".

Where the type for an element derives by extension from a base type, the elements and attributes that have been added to the base type's content are shown in bold.

6

KML Model Overview

6.1

KML Architecture

This section provides an overview of the KML schema type hierarchy. While element names are used, they represent the schema types that define their content. As KML is an XML grammar, element names are case-sensitive and must appear exactly as specified in the KML schema document. In KML, some types are derived from a parent type. A derived type inherits all of the elements of its parent type and may add some specific element content of its own. KML also includes abstract elements whose type is also abstract. Such abstract types are used to establish schema type hierarchies. Abstract elements may serve as placeholders for elements that substitute for them in the XML Schema sense. The core KML type hierarchy is represented in the following nested list. It shows the abstract KML elements that serve as the head of a substitution group for its corresponding type (in brackets). The abstract elements themselves follow an identical substitution hierarchy. For example, kml:AbstractContainerGroup substitutes for kml:AbstractFeatureGroup, which in turn substitutes for kml:AbstractObjectGroup. •

kml:AbstractObjectGroup (kml:AbstractObjectType) •

kml:AbstractFeatureGroup (kml:AbstractFeatureType) •

AbstractContainerGroup (kml:AbstractContainerType)

AbstractOverlayGroup (kml:AbstractOverlayType)

AbstractGeometryGroup (kml:AbstractGeometryType)

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

13

OGC 07-147r2

AbstractStyleSelectorGroup (kml:AbstractStyleSelectorType)

AbstractSubStyleGroup (kml:AbstractSubStyleType) •

AbstractColorStyleGroup (kml:AbstractColorStyleType)

AbstractLatLonBox (kml:AbstractLatLonBoxType)

AbstractViewGroup (kml: AbstractViewType)

AbstractTimePrimitiveGroup (kml:AbstractTimePrimitiveType)

These abstract elements and their associated base types define the core of the language. All concrete elements derived from kml:AbstractObjectGroup may have an assigned identifier. Simple elements are generally referred to as KML fields. Such elements are of XML Schema simple types or KML field types defined in the KML schema. KML field types are specified in clause 16 Field Types.

6.2

Coordinate Reference System

Each element that extends the kml:AbstractGeometryGroup element defines a spatial extent of a kml:Placemark. The spatial extent may include the location of an anchor point on the earth to serve as an origin for a 3D object as in the case of the kml:Model element, or may include the encoding of explicit coordinate tuples in the kml:coordinates element in the case of the kml:Point, kml:LineString, and kml:LinearRing elements. The KML encoding of every kml:Location and coordinate tuple uses geodetic longitude, geodetic latitude, and altitude (in that order) as defined in Annex A by the GML Coordinate Reference System (CRS) with identifier LonLat84_5773. Note that altitude is measured from the vertical datum, which is the WGS84 EGM96 Geoid. The altitude measurement (orthometric H) is illustrated in Figure 1.

14

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

Ellipsoid Geoid Terrain

H≈h - N

h

H

N

Figure 1: Altitude H is Measured from the Vertical Datum (Geoid) and is Compared to the Ellipsoid Height h and the Geoid Undulation N.

6.3 6.3.1

Geometry Interpolation for 3D Earth Browsers Interpolated Points

Geometric points which are not explicitly encoded are called interpolated points. The following subclauses describe the interpolation schemes for the kml:LineString, kml:LinearRing, and kml:Polygon elements. 6.3.2

kml:LineString and kml:LinearRing

The type of interpolation used for the kml:LineString and kml:LinearRing elements depend on the values of the child kml:altitudeMode and kml:tessellate elements. If the kml:altitudeMode value is not clampToGround then the interpolation between two consecutive control points is a straight line segment in the 3D WGS 84 geocentric coordinate reference system (urn:x-ogc:def:crs:EPSG:6.12:4978). This straight line segment will be referred to as L in Table 1, which summarizes the kml:LineString and kml:LinearRing interpolation scheme for the various combinations of kml:altitudeMode and kml:tessellate values. Table 1: Interpolation scheme for kml:LineString and kml:LinearRing <altitudeMode>

<tessellate>

Interpolation between control points

relativeToGround or absolute

0 (false) or 1 (true)

A straight line segment L in the 3D WGS 84 geocentric coordinate reference system (urn:x-ogc:def:crs:EPSG:6.12:4978)

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

15

OGC 07-147r2

<altitudeMode>

<tessellate>

Interpolation between control points

clampToGround

1 (true)

Project each point of L to the terrain surface along a line through the earth's center of mass

clampToGround

0 (false)

First project each control point to the terrain surface along a line through the earth's center of mass, then interpolate between the projected control points along a straight line segment in the 3D WGS 84 geocentric coordinate reference system (urn:xogc:def:crs:EPSG:6.12:4978)

For example, in the following KML instance the kml:LineString coordinates element has two control points (–135,30,500000) and (–80,30,500000) of the form (long,lat,altitude) in the CRS defined in with gml:id="LonLat84_5773". <kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <Placemark> <LineString> <altitudeMode>absolute</altitudeMode> <coordinates>-135,30,500000 -80,30,500000</coordinates> </LineString> </Placemark> </Document> </kml>

Since the kml:altitudeMode is absolute, the interpolation between these two control points is the straight line segment L shown in Figure 2 in the 3D WGS 84 geocentric CRS, which does not follow the earth's curvature and cuts through the earth's terrain.

z

Line segment L

WGS 84 Geocentric CRS with origin at earth’s center of mass and orthogonal x,y,z axes

y x

Figure 2: A kml:LineString Comprised of Two Control Points and a Single Line Segment Interpolated in the WGS 84 Geocentric CRS

16

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

The line segment L will be projected to the terrain surface if kml:altitudeMode and kml:tessellate are set as in the following kml:LineString instance. In this case the projected kml:LineString will follow the earth's curvature as shown in Figure 3 <kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <Placemark> <LineString> <tessellate>true</tessellate> <altitudeMode>clampToGround</altitudeMode> <coordinates>-135,30,500000 -80,30,500000</coordinates> </LineString> </Placemark> </Document> </kml>

z

LineString clamped to ground with tessellate enabled

y x

Figure 3: A Line Segment Interpolated in the WGS 84 Geocentric CRS

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

17

OGC 07-147r2

If kml:altitudeMode and kml:tessellate are set as in the following kml:LineString instance, then the only the control points are projected to the terrain and the interpolalation between the projected control points is a straight line segment in the WGS 84 Geocentric CRS as shown in Figure 4. <kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <Placemark> <LineString> <tessellate>false</tessellate> <altitudeMode>clampToGround</altitudeMode> <coordinates>-135,30,500000 -80,30,500000</coordinates> </LineString> </Placemark> </Document> </kml>

z

LineString clamped to ground with tessellate disabled

y x

Figure 4: A Line Segment Interpolated in the WGS 84 Geocentric CRS

6.3.3

kml:Polygon

The type of interpolation used for the kml:Polygon element also depends on the values of the child kml:altitudeMode and kml:tessellate elements. If the kml:altitudeMode value is not clampToGround then the interpolation of the kml:Polygon boundary comprised of the descendent kml:LinearRing elements is as described previously in Table 1. The remaining interior points of the kml:Polygon are then filled in linearly in the 3D WGS 84 geocentric CRS, i.e. they must lie on the plane that passes through all the control points of each kml:LinearRing. NOTE:

18

The control points of every kml:LinearRing must lie on a common plane.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

Table 2 summarizes the kml:Polygon interpolation scheme for the various combination of kml:altitudeMode and kml:tessellate values. Table 2: Interpolation scheme for kml:Polygon <altitudeMode>

<tessellate>

Interpolation between control points

relativeToGround or absolute

0 (false) or 1 (true)

Boundary points of the kml:Polygon in the descendent kml:LinearRing(s) are interpolated as in Table 1 and the interior points are filled in linearly in the 3D WGS 84 geocentric coordinate reference system (urn:x-ogc:def:crs:EPSG:6.12:4978), i.e. they must lie on a plane.

clampToGround

0 (false) or 1 (true)

The boundary control points of each descendent kml:LinearRing are first projected to the plate carrée plane (where altitude is dropped), then straight line segment interpolation in the plate carrée (long,lat) plane is used between consecutive control points. The interior points are then filled in linearly in the plate carrée plane. Finally, the (long,lat) points of the polygon in the plate carrée plane are mapped back to (long.lat,alt) points on the earth's terrain surface model

For example, the following kml:Polygon encodes five control points in its outer boundary in the CRS defined in Annex A with gml:id="LonLat84_5773".

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

19

OGC 07-147r2

<kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <Placemark> <Polygon> <altitudeMode>absolute</altitudeMode> <outerBoundaryIs> <LinearRing> <coordinates> -135,50,300000 -135,40,450000 -80,40,450000 -80,50,300000 -135,50,300000 </coordinates> </LinearRing> </outerBoundaryIs> </Polygon> </Placemark> </Document> </kml>

Since the kml:altitudeMode is absolute, the outer boundary points of the polygon that are interpolated between the control points in the kml:LinearRing form a quadrilateral perimeter in the 3D WGS 84 geocentric CRS. The interior points of this 4 sided polygon are filled in linearly in the 3D WGS 84 geocentric CRS and form the plane region inside the perimeter. Note that the plane region does not follow the earth's curvature and cuts through the surface of the earth as shown in Figure 5.

z

Polygon

WGS 84 Geocentric CRS with origin at earth’s center of mass and orthogonal x,y,z axes

y x

Figure 5: KML Polygon interpolation in the WGS 84 Geocentric CRS

20

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

In the following kml:Polygon instance the kml:altitudeMode is set to clampToGround. <kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <Placemark> <Polygon> <altitudeMode>clampToGround</altitudeMode> <outerBoundaryIs> <LinearRing> <coordinates>-135,78.5,300000 -135,12.5,300000 -45,12.5,300000 45,78.5,300000 -135,78.5,300000</coordinates> </LinearRing> </outerBoundaryIs> </Polygon> </Placemark> </Document> </kml>

The outer boundary points of the polygon that are interpolated between the control points in the kml:LinearRing form a rectangular perimeter in the plate carrée plane. Then the interior points of the rectangle are filled in linearly in this plane. Finally each (long,lat) point of the rectangle is mapped to a (long,lat,alt) point on the earth terrain surface as shown in Figure 6.

Figure 6: KML Polygon Interpolation in the Plate Carrée Plane 6.3.4

kml:GroundOverlay and kml:Region

The latitude and longitude boundaries for both kml:GroundOverlay and kml:Region are specified by the elements kml:west, kml:east, kml:south, and kml:north. In the case of kml:GroundOverlay constant lines of longitude demarcate the portion of the kml:LatLonBox boundary corresponding to the values of kml:west, kml:east and constant lines of latitude demarcate the portion of the boundary corresponding to the values of kml:south, kml:north. If kml:altitudeMode value is not clampToGround, as in the Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

21

OGC 07-147r2

following KML example, then the altitude of the kml:GroundOverlay is determined by the kml:altitude element. <kml> <GroundOverlay> <altitude>500000</altitude> <altitudeMode>absolute</altitudeMode> <LatLonBox> <north>80.0</north> <south>60.0</south> <east>60.0</east> <west>-60.0</west> </LatLonBox> </GroundOverlay> </kml>

The KML example above is shown in Figure 7. If kml:altitudeMode value is clampToGround then the kml:GroundOverlay is projected onto the earth's terrain surface model similar to the case of the kml:Polygon shown on the right hand side of Figure 6.

Figure 7: KML GroundOverlay when value of kml:altitudeMode is not clampToGround In the case of kml:Region the values of kml:west, kml:east of kml:LatLonAltBox determine the boundary surfaces of constant longitude and the values of kml:south, kml:north determine the boundary surfaces of constant latitude. The values of kml:minAltitude and kml:maxAltitude in the kml:LatLonAltBox determine the lower and upper bounding surfaces of constant altitude, respectively.

22

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<kml> <Region> <LatLonAltBox> <north>80.0</north> <south>60.0</south> <east>60.0</east> <west>-60.0</west> <minAltitude>500000</minAltitude> <maxAltitude>2000000</maxAltitude> <altitudeMode>absolute</altitudeMode> </LatLonAltBox> </Region> </kml>

The spatial extent of the sample kml:Region encoded above is depicted in Figure 8.

Figure 8: KML Region when value of kml:altitudeMode is not clampToGround

6.4

Shared Styles

A kml:Style or kml:StyleMap element contained by a kml:AbstractFeatureGroup element is an "inline style" and shall apply only to the kml:AbstractFeatureGroup that contains it. When these elements are encoded as the child of a kml:Document element they are called a "shared style." A shared style shall have an id value. A shared style applies to any kml:AbstractFeatureGroup that references the style from its child kml:styleUrl element. If a kml:AbstractFeatureGroup is associated with both an inline and shared style, the inline style shall take precedence. Shared styles shall only be encoded within a Document. Shared styles are not inherited by any child kml:AbstractFeatureGroup elements of a kml:Document. For a kml:Style or kml:StyleMap that applies to a kml:Document, the kml:Document itself must explicitly reference a shared style. For example:

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

23

OGC 07-147r2

<Document> <Style id="myPrettyDocument"> <ListStyle> ... </ListStyle> </Style> <styleUrl#myPrettyDocument"> ... </Document>

The following example illustrates the use of a shared style. <kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <name>Document.kml</name> <open>1</open> <Style id="exampleStyleDocument"> <LabelStyle> <color>ff0000cc</color> </LabelStyle> </Style> <Placemark> <name>Document Feature 1</name> <styleUrl>#exampleStyleDocument</styleUrl> <Point> <coordinates>-122.371,37.816,0</coordinates> </Point> </Placemark> <Placemark> <name>Document Feature 2</name> <styleUrl>#exampleStyleDocument</styleUrl> <Point> <coordinates>-122.370,37.817,0</coordinates> </Point> </Placemark> </Document> </kml>

6.5

Entity Replacement

Entity substitution is employed as a template mechanism within the kml:BalloonStyle kml:text element. Individual values shall be substituted for each instance of the entity, or a null string if no value exists. The source of values for entity substitution is local to the kml:AbstractFeatureGroup being styled and any kml:Schema elements associated with it. Entity syntax for identifying a substitution value is as follows: 1. $[element_or_attribute_name], where "element_or_attribute_name" is the name of a field element or attribute of the kml:AbstractFeatureGroup. This identifies the value of the field element or attribute. 2. $[name_attribute_of_Data_element], where "name_attribute_of_Data_element" is the value of the kml:name attribute of a descendant kml:Data element of the kml:AbstractFeatureGroup. This identifies the value of the child kml:value element of the kml:Data element.

24

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

3. $[name_attribute_of_Data_element/displayName], where "name_attribute_of_Data_element" is the value of the kml:name attribute of a descendant kml:Data element of the kml:AbstractFeatureGroup; "/" is a separator; and "displayName" is the value of the kml:displayName attribute of the kml:Data element. This identifies the value of the kml:displayName attribute. 4. $[TYPENAME/TYPEFIELD], where "TYPENAME" is the value of the kml:name attribute of a descendant kml:Schema element of the kml:AbstractFeatureGroup; "/" is a separator; and "TYPEFIELD" is the value of the kml:name attribute of a child kml:SimpleField element of the kml:Schema element . This identifies the value of a descendant kml:SimpleData element of the kml:AbstractFeatureGroup that references the kml:SimpleField element. 5. $[TYPENAME/TYPEFIELD/displayName], where "TYPENAME" is the value of the kml:name attribute of a descendant kml:Schema element of the kml:AbstractFeatureGroup; "/" is a separator; and "TYPEFIELD" is the value of the kml:name attribute of a child kml:SimpleField element of the kml:Schema element; and "displayName" is the value of the child kml:displayName element of the kml:SimpleField element. This identifies the value of the kml:displayName element. For example, the $[name] and $[description] entities in the following kml:BalloonStyle kml:text element shall be replaced by the kml:name and kml:description values of kml:AbstractFeatureGroup elements associated with the kml:BalloonStyle: <text>This is $[name], whose description is:<br/>$[description]</text>

6.6

Extension Model

6.6.1

Introduction

The KML schema provides several mechanisms to extend KML within application profiles. All KML extensions shall conform to the extension profile requirements discussed in 2.2 Application Profiles. 6.6.2

Extension by Inheritance

The KML schema defines abstract base types (e.g. kml:AbstractFeatureType), concrete types (e.g. kml:PlacemarkType), and abstract elements that act as the head of substitution groups (e.g. kml:AbstractFeatureGroup). While further derivation of all KML concrete

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

25

OGC 07-147r2

complex types is prohibited, new schema types may be derived from the core abstract base types (see 6.1). 6.6.3

Extension by Composition

6.6.3.1

Simple Element Substitution

A simple element whose type derives from xsd:anySimpleType may be declared to substitute for a KML abstract head element whose type is of xsd:anySimpleType. Such head elements have a naming convention whereby their local name ends with "SimpleExtensionGroup" (e.g. kml:AbstractFeatureSimpleExtensionGroup). 6.6.3.2

Complex Element Substitution

A complex element may substitute for a KML abstract head element that is: •

of a core abstract base type (e.g. kml:AbstractFeatureType).

of xsd:anyType and substitutes for kml:AbstractObjectGroup. Substituting for such an element requires a type definition that derives from kml:AbstractObjectGroup. All such head elements have a local name that ends with "ObjectExtensionGroup" (e.g. kml:AbstractFeatureObjectExtensionGroup).

head elements that are of xsd:anyType and declare no substitution group. These have a local name that ends with "Extension" (e.g. kml:DataExtension).

Usage examples:

26

a new element whose type derives by extension from kml:AbstractFeatureType and substitutes for kml:AbstractFeatureGroup would be available wherever kml:AbstractFeatureGroup is permitted; that is, as a child of kml:Document, kml:Folder, kml:kml or kml:Delete.

a new element whose type derives by extension from kml:AbstractObjectType and substitutes for kml:AbstractFeatureObjectExtensionGroup would be available wherever kml:AbstractFeatureObjectExtensionGroup is permitted; that is, as a child of kml:Document, kml:Folder, kml:GroundOverlay, kml:ScreenOverlay, kml:PhotoOverlay, kml:Placemark, and kml:NetworkLink.

a new element whose type is of xsd:anyType and substitutes for kml:DataExtension would be available wherever kml:DataExtension is permitted; that is, as a child of kml:Data.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

7

Root Element

7.1 7.1.1

kml Structure

<kml:kml hint="string [0..1]"> <kml:NetworkLinkControl> ... </kml:NetworkLinkControl> [0..1] <kml:AbstractFeatureGroup> ... </kml:AbstractFeatureGroup> [0..1] <kml:KmlSimpleExtensionGroup> ... </kml:KmlSimpleExtensionGroup> [0..*] <kml:KmlObjectExtensionGroup> ... </kml:KmlObjectExtensionGroup> [0..*] </kml:kml>

7.1.2

Description

The root element of a KML document instance. It should contain at least one of its child elements. 7.1.3 7.1.3.1

Content kml:NetworkLinkControl

See 13.2 kml:NetworkLinkControl. 7.1.3.2

kml:AbstractFeatureGroup

See 9.1 kml:AbstractFeatureGroup. 7.1.3.3

kml:KmlSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 7.1.3.4

kml:KmlObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

27

OGC 07-147r2

7.1.4

Attributes

7.1.4.1

hint

7.1.4.1.1

Description

The hint attribute may be used to provide information on how to process the KML document instance. 7.1.4.1.2

Content

Type: Default Value: 7.1.5

xsd:string none

Example

<kml xmlns="http://www.opengis.net/kml/2.2"> <NetworkLinkControl> ... </NetworkLinkControl> <Document> ... </Document> </kml>

28

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

8

Object

8.1

kml:AbstractObjectGroup

8.1.1

Structure

<kml:AbstractObjectGroup id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] </kml:AbstractObjectGroup>

8.1.2

Description Abstract:

yes

The following elements can be used wherever this element is referenced: •

kml:AbstractFeatureGroup

kml:AbstractContainerGroup

kml:Document

kml:Folder

kml:AbstractOverlayGroup

kml:GroundOverlay

kml:ScreenOverlay

kml:PhotoOverlay

kml:Placemark

kml:NetworkLink

kml:AbstractViewGroup

kml:LookAt

kml:Camera

kml:SchemaData

kml:Data

kml:AbstractGeometryGroup

kml:MultiGeometry

kml:Point

kml:LineString

kml:LinearRing

kml:Polygon

kml:Model

kml:AbstractStyleSelectorGroup

kml:Style

kml:StyleMap

kml:AbstractTimePrimitiveGroup

kml:TimeStamp

kml:TimeSpan

kml:Region

kml:LatLonAltBox

kml:Lod

kml:Icon

kml:Link

kml:Location

kml:Orientation

kml:Scale

kml:ResourceMap

kml:Alias

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

29

OGC 07-147r2

kml:AbstractLatLonBox

kml:LatLonBox

kml:ViewVolume

kml:ImagePyramid

kml:Pair

kml:AbstractSubStyleGroup

kml:AbstractColorStyleGroup

kml:IconStyle

kml:LabelStyle

kml:LineStyle

kml:PolyStyle

kml:BalloonStyle

kml:ListStyle

kml:ItemIcon

8.1.3

Attributes

8.1.3.1

id

8.1.3.1.1

Description

The id attribute may be used to specify a unique identifier for the kml:AbstractObjectGroup within the KML document instance. If a kml:AbstractObjectGroup is not being used for update purposes (not a descendant of kml:Update) and it is empty then it shall have an id attribute. This facilitates updating the object to include content at a later point in time. 8.1.3.1.2

Content

Type: Default Value: 8.1.3.2

targetId

8.1.3.2.1

Description

xsd:ID none

The optional targetId attribute may be used to encode the id value of another kml:AbstractObjectGroup. If a kml:AbstractObjectGroup is being used for update purposes (is a grandchild of kml:Update) then it shall have a targetId attribute referencing the kml:AbstractObjectGroup element to be updated. Otherwise, outside of an update context targetId has no meaning. See also 13.3 kml:Update.

30

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

8.1.3.2.2

Content

Type: Default Value: 8.1.3.3

xsd:NCName none

kml:AbstractObjectGroupSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

31

OGC 07-147r2

9

Features

9.1

kml:AbstractFeatureGroup

9.1.1

Structure

<kml:AbstractFeatureGroup id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:name> ... </kml:name> [0..1] <kml:visibility> ... </kml:visibility> [0..1] <kml:open> ... </kml:open> [0..1] <atom:author> ... </atom:author> [0..1] <atom:link> ... </atom:link> [0..1] <kml:address> ... </kml:address> [0..1] <xal:AddressDetails> ... </xal:AddressDetails> [0..1] <kml:phoneNumber> ... </kml:phoneNumber> [0..1] <kml:snippet> ... </kml:snippet> [0..1] <kml:description> ... </kml:description> [0..1] <kml:AbstractViewGroup> ... </kml:AbstractViewGroup> [0..1] <kml:AbstractTimePrimitiveGroup> ... </kml:AbstractTimePrimitiveGroup> [0..1] <kml:styleUrl> ... </kml:styleUrl> [0..1] <kml:AbstractStyleSelectorGroup> ... </kml:AbstractStyleSelectorGroup> [0..*] <kml:Region> ... </kml:Region> [0..1] <kml:ExtendedData> ... </kml:ExtendedData> [0..1] <kml:AbstractFeatureSimpleExtensionGroup> ... </kml:AbstractFeatureSimpleExtensionGroup> [0..*] <kml:AbstractFeatureObjectExtensionGroup> ... </kml:AbstractFeatureObjectExtensionGroup> [0..*] </kml:AbstractFeatureGroup>

9.1.2

Description Abstract:

yes

This element can be used wherever the following element is referenced: •

kml:AbstractObjectGroup

The following elements can be used wherever this element is referenced:

32

kml:AbstractContainerGroup

kml:Document

kml:Folder

kml:AbstractOverlayGroup

kml:GroundOverlay

kml:ScreenOverlay

kml:PhotoOverlay

kml:Placemark

kml:NetworkLink

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

9.1.3

Content

9.1.3.1

kml:name

9.1.3.1.1

Description

Specifies a label for the kml:AbstractFeatureGroup. 9.1.3.1.2

Content

Type: Default Value: 9.1.3.2

kml:visibility

9.1.3.2.1

Description

xsd:string none

Specifies whether the kml:AbstractFeatureGroup shall be drawn in the geographic view when it is initially loaded (1 or true), or not (0 or false). In order for a kml:AbstractFeatureGroup to be visible, the kml:visibility tag of all its ancestors shall also be set to 1 or true. 9.1.3.2.2

Content

Type: Default Value: 9.1.3.3

kml:open

9.1.3.3.1

Description

xsd:boolean 1 or true

Specifies whether a kml:AbstractContainerGroup appears expanded (1 or true) or collapsed (0 or false) when first loaded into the list view. See also 12.13 kml:ListStyle. 9.1.3.3.2

Content

Type: Default Value:

xsd:boolean 0 or false

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

33

OGC 07-147r2

9.1.3.4

atom:author

9.1.3.4.1

Description

Specifies the author of the kml:AbstractFeatureGroup. See also 9.6 kml:AbstractContainerGroup regarding the inheritance of the atom:author within KML feature hierarchies. 9.1.3.4.2

Content

See IETF RFC 4287, 4.2.1. 9.1.3.5

atom:link

9.1.3.5.1

Description

Specifies the URL of the source resource that contains the kml:AbstractFeatureGroup. The URL is encoded as the value of the atom:href attribute. The atom:link rel attribute shall be present and its value shall be related. See also 9.6 kml:AbstractContainerGroup regarding the inheritance of the atom:link within KML feature hierarchies. 9.1.3.5.2

Content

See IETF RFC 4287, 4.2.7. 9.1.3.6

kml:address

9.1.3.6.1

Description

A string value representing an unstructured address for the kml:AbstractFeatureGroup such as street, city, state address, and/or a postal code. This may be used to geocode the location of a kml:AbstractFeatureGroup if it does not contain a kml:AbstractGeometryGroup element. 9.1.3.6.2

Content

Type: Default Value:

34

xsd:string none

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

9.1.3.7

xal:AddressDetails

9.1.3.7.1

Description

A structured address for the kml:AbstractFeatureGroup formatted according to xAL 2.0. This may be used to geocode the location of a kml:AbstractFeatureGroup if it does not contain a kml:AbstractGeometryGroup element. 9.1.3.7.2

Content

See OASIS Extensible Address Language (XAL) 2.0. 9.1.3.8

kml:phoneNumber

9.1.3.8.1

Description

A value representing a telephone number. The number should be formatted according to IETF RFC 3966. 9.1.3.8.2

Content

Type: Default Value: 9.1.3.9

kml:snippet

9.1.3.9.1

Description

xsd:string none

Specifies a short description of the kml:AbstractFeatureGroup. This is used instead of kml:description in the list view if it exists. The text may include HTML content that is encoded as well-formed XML using HTML entity references or by enclosing the HTML within a CDATA section. 9.1.3.9.2

Content

Type: Default Value:

xsd:string none

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

35

OGC 07-147r2

9.1.3.10

kml:description

9.1.3.10.1

Description

Specifies a description of the kml:AbstractFeatureGroup. This should be displayed in the description balloon. The text may include HTML content that is encoded as well-formed XML using HTML entity references or by enclosing the HTML within a CDATA section. If the description includes the HTML <a href="..." type="..."> tag, it should have an HTML href and type attribute and be interpreted as follows: •

The href attribute specifies a URL.

If the target of the href is a KML resource, an earth browser should load the resource if the link is activated.

The href may reference another kml:AbstractFeatureGroup if its value is the fragment component of a URL (see 12.9.3.1). If such a link is activated the geographic view should fly to the kml:AbstractFeatureGroup whose ID matches the fragment. If this kml:AbstractFeatureGroup has a kml:LookAt or kml:Camera element, it shall be viewed from the specified viewpoint. Special processing is required for embedded HTML links that append a display directive to the fragment component of the URL; such a directive (e.g. ";flyto") must be removed from the fragment component in order to obtain the shorthand pointer. Available directives are: •

;flyto (default) – fly to the kml:AbstractFeatureGroup

;balloon – open the kml:AbstractFeatureGroup's balloon but do not fly to the kml:AbstractFeatureGroup

;balloonFlyto – open the kml:AbstractFeatureGroup's balloon and fly to the kml:AbstractFeatureGroup

For example, the following code indicates to open the resource CraftsFairs.kml resource, fly to the kml:Placemark whose ID is "Albuquerque," and open its balloon: <description> <a href="http://myServer.com/CraftsFairs.kml#Albuquerque;balloonFlyto"> One of the Best Art Shows in the West</a> </description>

The type attribute specifies the MIME type for the target resource. An earth browser should interpret the target resource according to this specified MIME type when attempting to load it. To indicate that the target resource is KML specify the following MIME type:

36

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

type="application/vnd.google-earth.kml+xml"

To indicate that the target resource is a KMZ archive specify the following MIME type: type="application/vnd.google-earth.kmz"

For example, the type attribute below indicates that an earth browser should attempt to load the target as a KML resource even though the file extension is .php: <a href="myserver.com/cgi-bin/generate-kml.php#placemark123" type="application/vnd.google-earth.kml+xml"

9.1.3.10.2

Content

Type: Default Value: 9.1.3.11

xsd:string none

kml:AbstractViewGroup

Specifies a viewpoint for the kml:AbstractFeatureGroup. See 14.1 AbstractViewGroup. 9.1.3.12

kml:AbstractTimePrimitiveGroup

Affects the visibility of the kml:AbstractFeatureGroup. See 15.1 kml:AbstractTimePrimitiveGroup. 9.1.3.13

kml:styleURL

9.1.3.13.1

Description

Specifies a reference to a kml:Style or kml:StyleMap. The reference shall be encoded as a URL with a fragment component (see 12.9.3.1). The value of the fragment shall be the id of a kml:Style or kml:StyleMap defined in a kml:Document. See also 12.2 kml:Style; 12.3 kml:StyleMap, and 6.4 Shared Styles. 9.1.3.13.2

Content

Type: Default Value:

xsd:anyURI none

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

37

OGC 07-147r2

9.1.3.13.3

Example

To reference a kml:Style or kml:StyleMap in the same document: <styleUrl>#myIconStyleID</styleUrl>

To reference a kml:Style or kml:StyleMap in a hosted document: <styleUrl>http://someserver.com/somestylefile.xml#restaurant</styleUrl>

9.1.3.14

kml:AbstractStyleSelectorGroup

One or more kml:Styles or kml:StyleMaps used to style the kml:Feature. See also 12.1 kml:AbstractStyleSelectorGroup and 6.4 Shared Styles. 9.1.3.15

kml:Region

Affects the visibility of the kml:AbstractFeatureGroup . See 9.13 kml:Region. 9.1.3.16

kml:ExtendedData

Allows for the addition of user-defined data. See 9.2 ExtendedData. 9.1.3.17

kml:AbstractFeatureSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 9.1.3.18

kml:AbstractFeatureObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

38

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

9.1.4 9.1.4.1

Examples Sample Use of HTML Elements within a Description

<kml xmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>Feature.kml</name> <Snippet maxLines="4"> The snippet is a way of providing an alternative description that will be shown in the List view. </Snippet> <description> <![CDATA[ Styles: <i>Italics</i>, <b>Bold</b>, <u>Underlined</u>, <s>Strike Out</s>, subscript<sub>subscript</sub>, superscript<sup>superscript</sup>, <big>Big</big>, <small>Small</small>, <tt>Typewriter</tt>, <em>Emphasized</em>, <strong>Strong</strong>, <code>Code</code> <hr /> Fonts: <font color="red">red by name</font>, <font color="#408010">leaf green by hexadecimal RGB</font>, <font size=1>size 1</font>, <font size=2>size 2</font>, <font size=3>size 3</font>, <font size=4>size 4</font>, <font size=5>size 5</font>, <font size=6>size 6</font>, <font size=7>size 7</font>, <font face=times>Times</font>, <font face=verdana>Verdana</font>, <font face=arial>Arial</font> <br/> <hr /> Links: <a href="http://doc.trolltech.com/3.3/qstylesheet.html"> QT Rich Text Rendering </a> <br /> <hr /> Alignment: <br /> <p align=left>left</p><p align=center>center</p> <p align=right>right</p> <hr /> Ordered Lists: <br /> <ol><li>First</li><li>Second</li><li>Third</li></ol> <ol type="a"><li>First</li><li>Second</li><li>Third</li></ol> <ol type="A"><li>First</li><li>Second</li><li>Third</li></ol> <hr /> Unordered Lists: <br /> <ul><li>A</li><li>B</li><li>C</li></ul> <ul type="circle"><li>A</li><li>B</li><li>C</li></ul> <ul type="square"><li>A</li><li>B</li><li>C</li></ul> <hr /> Definitions: <br /> <dl> <dt>Scrumpy</dt>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

39

OGC 07-147r2

<dd>Hard English cider from the west country</dd> <dt>Pentanque</dt> <dd>A form of boules where the goal is to throw metal ball as close as possible to a jack</dd> </dl> <hr /> Block Quote: <br /> <blockquote> We shall not cease from exploration<br /> And the end of all our exploring<br /> Will be to arrive where we started<br /> And know the place for the first time </blockquote> <br /> <hr /> Centered: <br /> <center>See, I have a Rhyme assisting<br /> my feeble brain,<br /> its tasks oft-times resisting!</center> <hr /> Headings: <br /> <h1>Header 1</h1> <h2>Header 2</h2> <h3>Header 3</h3> <h3>Header 4</h4> <h3>Header 5</h5> <hr /> Images: <br /> <img src="http://www.opengis.net/images/googleearth.gif" /> <br /> <i>Scaled image</i> <br /> <img src="http://www.opengis.net/images/googleearth.gif" width="100" /> <br /> <hr /> Tables: <table border="1" padding="3" width="300"> <tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td></tr> <tr><td>a</td><td>b</td><td>c</td><td>d</td><td>e</td></tr> </table> ]]> </description> <Point> <coordinates>-122.378927,37.826793,0</coordinates> </Point> </Placemark> </kml>

9.1.4.2

Sample Use of Atom Elements

This example shows use of the atom:author, atom:name and atom:link attribution elements from the Atom namespace. In this case, atom:author and atom:link apply to both kml:Placemarks.

40

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"> <Document> <atom:author> <atom:name>J. K. Rowling</atom:name> </atom:author> <atom:link href="http://www.harrypotter.com" /> <Placemark> <name>Hogwarts</name> <Point> <coordinates>1,1</coordinates> </Point> </Placemark> <Placemark> <name>Little Hangleton</name> <Point> <coordinates>1,2</coordinates> </Point> </Placemark> </Document> </kml>

9.2 9.2.1

kml:ExtendedData Structure

<kml:ExtendedData> <kml:Data> ... </kml:Data> [0..*] <kml:SchemaData> ... </kml:SchemaData> [0..*] Allow any elements from a namespace other than this schema's namespace (lax validation). [0..*] </kml:ExtendedData>

9.2.2

Description

The kml:ExtendedData element offers three mechanisms for adding user-defined data to a kml:AbstractFeatureGroup. These mechanisms are: •

Adding arbitrary untyped name/value data pairs using the kml:Data element

Adding instances of typed fields defined in the user-defined kml:Schema element

Including any XML content defined in namespaces other than the KML namespace and null namespace

These mechanisms can be used concurrently within a single kml:AbstractFeatureGroup or KML document. Child elements of kml:ExtendedData support entity substitution. See 6.5 Entity Replacement.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

41

OGC 07-147r2

The scope of kml:ExtendedData is restricted to its parent kml:AbstractFeatureGroup only. kml:ExtendedData should contain at least one child element outside of an update context, that is when not a descendant of kml:Update.

9.2.3

Content

9.2.3.1

kml:Data

An untyped name/value pair. See 9.3 kml:Data. 9.2.3.2

kml:SchemaData

Encodes an instance of a user-defined data type defined by a referenced kml:Schema See 9.4 kml:SchemaData. 9.2.3.3

xsd:any

9.2.3.3.1

Description

kml:ExtendedData may include any other well-formed, namespace-qualified XML content

that is not from: •

the KML namespace, "http://www.opengis.net/kml/2.2"

the null or empty namespace, ""

9.2.3.3.2

Content

Type: Default Value: 9.2.3.3.3

xsd:anyType none

Example

The following example demonstrates the encoding of XML content from the "http://www.example.org/app" namespace:

42

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<kml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/kml/2.2" xmlns:app="http://www.example.org/app" xmlns:gml="http://www.opengis.net/gml"> <Placemark> <name>A road</name> <ExtendedData> <app:Road> <app:numberOfLanes>2</app:numberOfLanes> <app:pavement>gravel</app:pavement> </app:Road> </ExtendedData> </Placemark> </kml>

9.3

kml:Data

9.3.1

Structure

<kml:Data id="ID [0..1]" targetId="NCName [0..1]" name="string [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:displayName> ... </kml:displayName> [0..1] <kml:value> string </kml:value> [1] <kml:DataExtension> ... </kml:DataExtension> [0..*] </kml:Data>

9.3.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractObjectGroup

Creates an untyped name/value data pair, where: •

The data pair is identified by the name attribute

The value of the data pair is supplied by kml:value

Both name and kml:value should be encoded. The value of the name attribute shall be unique within the context of its parent kml:ExtendedData element.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

43

OGC 07-147r2

9.3.3

Content

9.3.3.1

kml:displayName

9.3.3.1.1

Description

An alternate display name. 9.3.3.1.2

Content

Type: Default Value: 9.3.3.2

kml:value

9.3.3.2.1

Description

xsd:string none

Value of the data pair. 9.3.3.2.2

Content

Type: Default Value: 9.3.3.3

xsd:string none

kml:DataExtension

See 6.6.3.2 Complex Element Substitution. 9.3.4

Attributes

9.3.4.1

name

9.3.4.1.1

Description

Name of the data pair. 9.3.4.1.2

Content

Type: Default Value:

44

xsd:string none

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

9.3.5

Example

<Placemark> <name>Club house</name> <ExtendedData> <Data name="holeNumber"> <value>1</value> </Data> <Data name="holeYardage"> <value>234</value> </Data> <Data name="holePar"> <value>4</value> </Data> </ExtendedData> </Placemark>

9.4

kml:SchemaData

9.4.1

Structure

<kml:SchemaData id="ID [0..1]" targetId="NCName [0..1]" schemaUrl="anyURI [0..1]"> <kml:AbstractObjectGroupSimpleExtensionGroup> ... </kml:AbstractObjectGroupSimpleExtensionGroup> [0..*] <kml:SimpleData> ... </kml:SimpleData> [0..*] <kml:SchemaDataExtension> ... </kml:SchemaDataExtension> [0..*] </kml:SchemaData>

9.4.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractObjectGroup

Encodes an instance of a user-defined data type defined by a referenced kml:Schema. A kml:SchemaData element shall reference a kml:Schema element using the kml:schemaUrl attribute. 9.4.3 9.4.3.1

Content kml:SimpleData

See 9.5 kml:SimpleData.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

45

OGC 07-147r2

9.4.3.2

kml:SchemaDataExtension

See 6.6.3.2 Complex Element Substitution. 9.4.4

Attributes

9.4.4.1

schemaUrl

9.4.4.1.1

Description

The value of kml:schemaURL should be a full URL, a reference to a kml:Schema id attribute defined in an external KML resource, or a reference to a kml:Schema id defined in the same KML resource. 9.4.4.1.2

Content

Type: Default Value: 9.4.4.1.3

xsd:anyURI none

Examples

All of the following URI values are acceptable: schemaUrl="http://host.com/PlacesIHaveLived.kml#my-schema-id"

schemaUrl="AnotherFile.kml#my-schema-id"

46

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

schemaUrl="#schema-id"

9.5

kml:SimpleData

9.5.1

Structure

<!-- same resource -->

<kml:SimpleData name="string [1]"> string </kml:SimpleData>

9.5.2

Description

Encodes an instance of a user-defined field defined by a referenced kml:SimpleField. The value of kml:SimpleData shall be of the data type defined by the referenced kml:SimpleField. The required name attribute shall be used to identify the kml:SimpleField by name. The identified kml:SimpleField shall be declared within the kml:Schema element that is referenced from the kml:SchemaURL attribute. 9.5.3

Content Type: Default Value:

9.5.4

Attributes

9.5.4.1

name

9.5.4.1.1

Description

xsd:string none

Name acting as an identifier. 9.5.4.1.2

Content

Type: xsd:string Default Value: none 9.5.5

Example

Here is an example of encoding two user-defined data elements:

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

47

OGC 07-147r2

<kml xmlns="http://earth.google.com/kml/2.2"> <Document> <name>ExtendedData+SchemaData</name> <open>1</open> <!-- Create a balloon template referring to the user-defined type --> <Style id="trailhead-balloon-template"> <BalloonStyle> <text> <![CDATA[ <h2>My favorite trails!</h2> <br/><br/> The $[TrailHeadType/TrailHeadName/displayName] is <i>$[TrailHeadType/TrailHeadName]</i>. The trail is $[TrailHeadType/TrailLength] miles.<br/> The climb is $[TrailHeadType/ElevationGain] meters.<br/><br/> ]]> </text> </BalloonStyle> </Style> <!-- Declare the type "TrailHeadType" with 3 fields --> <Schema name="TrailHeadType" id="TrailHeadTypeId"> <SimpleField type="string" name="TrailHeadName"> <displayName><![CDATA[<b>Trail Head Name</b>]]></displayName> </SimpleField> <SimpleField type="double" name="TrailLength"> <displayName><![CDATA[<i>The length in miles</i>]]></displayName> </SimpleField> <SimpleField type="int" name="ElevationGain"> <displayName><![CDATA[<i>change in altitude</i>]]></displayName> </SimpleField> </Schema>

48

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<!-- Instantiate some Placemarks extended with TrailHeadType fields --> <Placemark> <name>Easy trail</name> <styleUrl>#trailhead-balloon-template</styleUrl> <ExtendedData> <SchemaData schemaUrl="#TrailHeadTypeId"> <SimpleData name="TrailHeadName">Pi in the sky</SimpleData> <SimpleData name="TrailLength">3.14159</SimpleData> <SimpleData name="ElevationGain">10</SimpleData> </SchemaData> </ExtendedData> <Point> <coordinates>-122.000,37.002</coordinates> </Point> </Placemark> <Placemark> <name>Difficult trail</name> <styleUrl>#trailhead-balloon-template</styleUrl> <ExtendedData> <SchemaData schemaUrl="#TrailHeadTypeId"> <SimpleData name="TrailHeadName">Mount Everest</SimpleData> <SimpleData name="TrailLength">347.45</SimpleData> <SimpleData name="ElevationGain">10000</SimpleData> </SchemaData> </ExtendedData> <Point> <coordinates>-121.998,37.0078</coordinates> </Point> </Placemark> </Document> </kml>

9.6 9.6.1

kml:AbstractContainerGroup Structure

<kml:AbstractContainerGroup id="ID [0..1]" targetId="NCName [0..1]"> <kml:AbstractObjectGroupSimpleExtensionGroup> ... </kml:AbstractObjectGroupSimpleExtensionGroup> [0..*] <kml:name> ... </kml:name> [0..1] <kml:visibility> ... </kml:visibility> [0..1] <kml:open> ... </kml:open> [0..1] <atom:author> ... </atom:author> [0..1] <atom:link> ... </atom:link> [0..1] <kml:address> ... </kml:address> [0..1] <xal:AddressDetails> ... </xal:AddressDetails> [0..1] <kml:phoneNumber> ... </kml:phoneNumber> [0..1] <kml:snippet> ... </kml:snippet> [0..1] <kml:description> ... </kml:description> [0..1] <kml:AbstractViewGroup> ... </kml:AbstractViewGroup> [0..1] <kml:AbstractTimePrimitiveGroup> ... </kml:AbstractTimePrimitiveGroup> [0..1] <kml:styleUrl> ... </kml:styleUrl> [0..1] <kml:AbstractStyleSelectorGroup> ... </kml:AbstractStyleSelectorGroup> [0..*] <kml:Region> ... </kml:Region> [0..1] <kml:ExtendedData> ... </kml:ExtendedData> [0..1]

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

49

OGC 07-147r2

<kml:AbstractFeatureSimpleExtensionGroup> ... </kml:AbstractFeatureSimpleExtensionGroup> [0..*] <kml:AbstractFeatureObjectExtensionGroup> ... </kml:AbstractFeatureObjectExtensionGroup> [0..*] <kml:AbstractContainerSimpleExtensionGroup> ... </kml:AbstractContainerSimpleExtensionGroup> [0..*] <kml:AbstractContainerObjectExtensionGroup> ... </kml:AbstractContainerObjectExtensionGroup> [0..*] </kml:AbstractContainerGroup>

9.6.2

Description Abstract:

yes

This element can be used wherever the following element is referenced: •

kml:AbstractFeatureGroup

The following elements can be used wherever this element is referenced: •

kml:Document

kml:Folder

For convenience in constructing KML feature hierarchies, unless overruled by the presence of such elements locally, the value of the following kml:AbstractFeatureGroup elements shall be inherited by all kml:AbstractFeatureGroup members of a feature hierarchy: •

atom:author

atom:link

kml:Region

kml:AbstractTimePrimitiveGroup

Thus it is not necessary for a child kml:AbstractFeatureGroup to carry any of these elements where their local value is the same as that of its parent kml:Document or kml:Folder. Inheritance of these elements continues to any depth of nesting, but if overruled by a local declaration, then the new value is inherited by all its children in turn. Notwithstanding this rule, such elements may be used locally even if they have the same value as that of a parent kml:Document or kml:Folder. 9.6.3 9.6.3.1

Content kml:AbstractContainerSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution.

50

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

9.6.3.2

kml:AbstractContainerObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

9.7

kml:Document

9.7.1

Structure

<kml:Document id="ID [0..1]" targetId="NCName [0..1]"> <kml:AbstractObjectGroupSimpleExtensionGroup> ... </kml:AbstractObjectGroupSimpleExtensionGroup> [0..*] <kml:name> ... </kml:name> [0..1] <kml:visibility> ... </kml:visibility> [0..1] <kml:open> ... </kml:open> [0..1] <atom:author> ... </atom:author> [0..1] <atom:link> ... </atom:link> [0..1] <kml:address> ... </kml:address> [0..1] <xal:AddressDetails> ... </xal:AddressDetails> [0..1] <kml:phoneNumber> ... </kml:phoneNumber> [0..1] <kml:snippet> ... </kml:snippet> [0..1] <kml:description> ... </kml:description> [0..1] <kml:AbstractViewGroup> ... </kml:AbstractViewGroup> [0..1] <kml:AbstractTimePrimitiveGroup> ... </kml:AbstractTimePrimitiveGroup> [0..1] <kml:styleUrl> ... </kml:styleUrl> [0..1] <kml:AbstractStyleSelectorGroup> ... </kml:AbstractStyleSelectorGroup> [0..*] <kml:Region> ... </kml:Region> [0..1] <kml:ExtendedData> ... </kml:ExtendedData> [0..1] <kml:AbstractFeatureSimpleExtensionGroup> ... </kml:AbstractFeatureSimpleExtensionGroup> [0..*] <kml:AbstractFeatureObjectExtensionGroup> ... </kml:AbstractFeatureObjectExtensionGroup> [0..*] <kml:AbstractContainerSimpleExtensionGroup> ... </kml:AbstractContainerSimpleExtensionGroup> [0..*] <kml:AbstractContainerObjectExtensionGroup> ... </kml:AbstractContainerObjectExtensionGroup> [0..*] <kml:Schema> ... </kml:Schema> [0..*] <kml:AbstractFeatureGroup> ... </kml:AbstractFeatureGroup> [0..*] <kml:DocumentSimpleExtensionGroup> ... </kml:DocumentSimpleExtensionGroup> [0..*] <kml:DocumentObjectExtensionGroup> ... </kml:DocumentObjectExtensionGroup> [0..*] </kml:Document>

9.7.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractContainerGroup

A kml:Document is a container for KML features, shared styles, and user-defined schemas. See also 6.4 Shared Styles.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

51

OGC 07-147r2

9.7.3 9.7.3.1

Content kml:Schema

Specifies a user-defined schema. See 9.8 kml:Schema. 9.7.3.2

kml:AbstractFeatureGroup

See 9.1 kml:AbstractFeatureGroup. 9.7.3.3

kml:DocumentSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 9.7.3.4

kml:DocumentObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

9.8

kml:Schema

9.8.1

Structure

<kml:Schema name="string [0..1]" id="ID [0..1]"> <kml:SimpleField> ... </kml:SimpleField> [0..*] <kml:SchemaExtension> ... </kml:SchemaExtension> [0..*] </kml:Schema>

9.8.2

Description

Specifies a user-defined schema that is used to add user-defined data encoded within a child kml:ExtendedData element of a kml:AbstractFeatureGroup. kml:Schema shall have an id so that instances of it (encoded as kml:SchemaData) may reference it. 9.8.3 9.8.3.1

Content kml:SimpleField

See 9.9 kml:SimpleField.

52

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

9.8.3.2

kml:SchemaExtension

See 6.6.3.2 Complex Element Substitution. 9.8.4

Attributes

9.8.4.1

id

9.8.4.1.1

Description

Unique identifier the kml:AbstractObjectGroup within the KML document instance. 9.8.4.1.2

Content

Type: Default Value: 9.8.4.2

xsd:ID none

name

See 9.5.4.1 name.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

53

OGC 07-147r2

9.8.5

Example

<kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <Schema name="TrailHeadType" id="TrailHeadTypeId"> <SimpleField type="string" name="TrailHeadName"> <displayName><![CDATA[<b>Trail Head Name</b>]]></displayName> </SimpleField> <SimpleField type="double" name="TrailLength"> <displayName><![CDATA[<i>The length in miles</i>]]></displayName> </SimpleField> <SimpleField type="int" name="ElevationGain"> <displayName><![CDATA[<i>change in altitude</i>]]></displayName> </SimpleField> </Schema> </Document> </kml>

9.9 9.9.1

kml:SimpleField Structure

<kml:SimpleField type="string [0..1]" name="string [0..1]"> <kml:displayName> ... </kml:displayName> [0..1] <kml:SimpleFieldExtension> ... </kml:SimpleFieldExtension> [0..*] </kml:SimpleField>

9.9.2

Description

Specifies a user-defined field. The name and type attributes shall be specified. 9.9.3 9.9.3.1

Content kml:displayName

See 12.7 kml:displayName. 9.9.3.2

kml:SimpleFieldExtension

See 6.6.3.2 Complex Element Substitution.

54

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

9.9.4

Attributes

9.9.4.1

name

See 9.5.4.1 name. 9.9.4.2

type

9.9.4.2.1

Description

Type of the field. The type content shall be formatted according to one of the following XML Schema types: •

xsd:string

xsd:int

xsd:unsignedInt

xsd:short

xsd:unsignedShort

xsd:float

xsd:double

xsd:boolean

9.9.4.2.2

Content

Type: xsd:string Default Value: none

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

55

OGC 07-147r2

9.10

kml:Folder

9.10.1

Structure

<kml:Folder id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:name> ... </kml:name> [0..1] <kml:visibility> ... </kml:visibility> [0..1] <kml:open> ... </kml:open> [0..1] <atom:author> ... </atom:author> [0..1] <atom:link> ... </atom:link> [0..1] <kml:address> ... </kml:address> [0..1] <xal:AddressDetails> ... </xal:AddressDetails> [0..1] <kml:phoneNumber> ... </kml:phoneNumber> [0..1] <kml:snippet> ... </kml:snippet> [0..1] <kml:description> ... </kml:description> [0..1] <kml:AbstractViewGroup> ... </kml:AbstractViewGroup> [0..1] <kml:AbstractTimePrimitiveGroup> ... </kml:AbstractTimePrimitiveGroup> [0..1] <kml:styleUrl> ... </kml:styleUrl> [0..1] <kml:AbstractStyleSelectorGroup> ... </kml:AbstractStyleSelectorGroup> [0..*] <kml:Region> ... </kml:Region> [0..1] <kml:ExtendedData> ... </kml:ExtendedData> [0..1] <kml:AbstractFeatureSimpleExtensionGroup> ... </kml:AbstractFeatureSimpleExtensionGroup> [0..*] <kml:AbstractFeatureObjectExtensionGroup> ... </kml:AbstractFeatureObjectExtensionGroup> [0..*] <kml:AbstractContainerSimpleExtensionGroup> ... </kml:AbstractContainerSimpleExtensionGroup> [0..*] <kml:AbstractContainerObjectExtensionGroup> ... </kml:AbstractContainerObjectExtensionGroup> [0..*] <kml:AbstractFeatureGroup> ... </kml:AbstractFeatureGroup> [0..*] <kml:FolderSimpleExtensionGroup> ... </kml:FolderSimpleExtensionGroup> [0..*] <kml:FolderObjectExtensionGroup> ... </kml:FolderObjectExtensionGroup> [0..*] </kml:Folder>

9.10.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractContainerGroup

A kml:Folder is used to organize kml:AbstractFeatureGroup elements hierarchically. Contains zero or more kml:AbstractFeatureGroup elements and allows the creation of one or more nested hierarchies of KML features. kml:Folder should contain at least one child element outside of an update context, that is when not a descendant of kml:Update.

56

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

9.10.3 9.10.3.1

Content kml:AbstractFeatureGroup

See 9.1 kml:AbstractFeatureGroup. 9.10.3.2

kml:FolderSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 9.10.3.3

kml:FolderObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

57

OGC 07-147r2

9.10.4

Example

<kml xmlns="http://www.opengis.net/kml/2.2"> <Folder> <name>Folder.kml</name> <open>1</open> <description> A folder is a container that can hold multiple other objects </description> <Placemark> <name>Folder object 1 (Placemark)</name> <Point> <coordinates>-122.377588,37.830266,0</coordinates> </Point> </Placemark> <Placemark> <name>Folder object 2 (Polygon)</name> <Polygon> <outerBoundaryIs> <LinearRing> <coordinates> -122.377830,37.830445,0 -122.377576,37.830631,0 -122.377840,37.830642,0 -122.377830,37.830445,0 </coordinates> </LinearRing> </outerBoundaryIs> </Polygon> </Placemark> <Placemark> <name>Folder object 3 (Path)</name> <LineString> <tessellate>1</tessellate> <coordinates> -122.378009,37.830128,0 -122.377885,37.830379,0 </coordinates> </LineString> </Placemark> </Folder> </kml>

9.11

kml:Placemark

9.11.1

Structure

<kml:Placemark id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:name> ... </kml:name> [0..1] <kml:visibility> ... </kml:visibility> [0..1] <kml:open> ... </kml:open> [0..1] <atom:author> ... </atom:author> [0..1] <atom:link> ... </atom:link> [0..1] <kml:address> ... </kml:address> [0..1] <xal:AddressDetails> ... </xal:AddressDetails> [0..1]

58

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<kml:phoneNumber> ... </kml:phoneNumber> [0..1] <kml:snippet> ... </kml:snippet> [0..1] <kml:description> ... </kml:description> [0..1] <kml:AbstractViewGroup> ... </kml:AbstractViewGroup> [0..1] <kml:AbstractTimePrimitiveGroup> ... </kml:AbstractTimePrimitiveGroup> [0..1] <kml:styleUrl> ... </kml:styleUrl> [0..1] <kml:AbstractStyleSelectorGroup> ... </kml:AbstractStyleSelectorGroup> [0..*] <kml:Region> ... </kml:Region> [0..1] <kml:ExtendedData> ... </kml:ExtendedData> [0..1] <kml:AbstractFeatureSimpleExtensionGroup> ... </kml:AbstractFeatureSimpleExtensionGroup> [0..*] <kml:AbstractFeatureObjectExtensionGroup> ... </kml:AbstractFeatureObjectExtensionGroup> [0..*] <kml:AbstractGeometryGroup> ... </kml:AbstractGeometryGroup> [0..1] <kml:PlacemarkSimpleExtensionGroup> ... </kml:PlacemarkSimpleExtensionGroup> [0..*] <kml:PlacemarkObjectExtensionGroup> ... </kml:PlacemarkObjectExtensionGroup> [0..*] </kml:Placemark>

9.11.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractFeatureGroup

A kml:Placemark is a kml:AbstractFeatureGroup with an associated kml:AbstractGeometryGroup. A kml:Placemark with a kml:Point geometry should be drawn with an icon to mark the kml:Placemark in the geographic view. The point itself determines the position of the kml:Placemark's name and display icon. kml:Placemark should contain a kml:AbstractGeometryGroup element outside of an update context, that is when not a descendant of kml:Update.

9.11.3 9.11.3.1

Content kml:AbstractGeometryGroup

See 10.1 kml:AbstractGeometryGroup. 9.11.3.2

kml:PlacemarkSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 9.11.3.3

kml:PlacemarkObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution. Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

59

OGC 07-147r2

9.11.4

Example

<Placemark> <name>New Placemark</name> <description>Some Descriptive text.</description> <LookAt> <longitude>-90.86879847669974</longitude> <latitude>48.25330383601299</latitude> <range>440.8</range> <tilt>8.3</tilt> <heading>2.7</heading> </LookAt> <Point> <coordinates>-90.86948943473118,48.25450093195546,0</coordinates> </Point> </Placemark>

60

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

9.12

kml:NetworkLink

9.12.1

Structure

<kml:NetworkLink id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:name> ... </kml:name> [0..1] <kml:visibility> ... </kml:visibility> [0..1] <kml:open> ... </kml:open> [0..1] <atom:author> ... </atom:author> [0..1] <atom:link> ... </atom:link> [0..1] <kml:address> ... </kml:address> [0..1] <xal:AddressDetails> ... </xal:AddressDetails> [0..1] <kml:phoneNumber> ... </kml:phoneNumber> [0..1] <kml:snippet> ... </kml:snippet> [0..1] <kml:description> ... </kml:description> [0..1] <kml:AbstractViewGroup> ... </kml:AbstractViewGroup> [0..1] <kml:AbstractTimePrimitiveGroup> ... </kml:AbstractTimePrimitiveGroup> [0..1] <kml:styleUrl> ... </kml:styleUrl> [0..1] <kml:AbstractStyleSelectorGroup> ... </kml:AbstractStyleSelectorGroup> [0..*] <kml:Region> ... </kml:Region> [0..1] <kml:ExtendedData> ... </kml:ExtendedData> [0..1] <kml:AbstractFeatureSimpleExtensionGroup> ... </kml:AbstractFeatureSimpleExtensionGroup> [0..*] <kml:AbstractFeatureObjectExtensionGroup> ... </kml:AbstractFeatureObjectExtensionGroup> [0..*] <kml:refreshVisibility> ... </kml:refreshVisibility> [0..1] <kml:flyToView> ... </kml:flyToView> [0..1] <kml:Link> ... </kml:Link> [0..1] <kml:NetworkLinkSimpleExtensionGroup> ... </kml:NetworkLinkSimpleExtensionGroup> [0..*] <kml:NetworkLinkObjectExtensionGroup> ... </kml:NetworkLinkObjectExtensionGroup> [0..*] </kml:NetworkLink>

9.12.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractFeatureGroup

References a KML resource on a local or remote network. kml:NetworkLink elements may be used in combination with kml:Region elements to efficiently load and display large datasets.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

61

OGC 07-147r2

9.12.3

Content

9.12.3.1

kml:refreshVisibility

9.12.3.1.1

Description

Specifies the control over the visibility of any kml:AbstractFeatureGroup elements within the referenced KML resource. A value of 0 or false shall leave the visibility of any referenced kml:AbstractFeatureGroup elements in the geographic view within the control of the earth browser user. A value of 1 or true shall require any referenced kml:AbstractFeatureGroup elements to be visible within the geographic view whenever such kml:AbstractFeatureGroup elements are refreshed. 9.12.3.1.2

Content

Type: Default Value:

xsd:boolean 0 or false

9.12.3.2

kml:flyToView

9.12.3.2.1

Description

Specifies whether to adjust the geographic view upon kml:NetworkLink activation. A value of 0 or false indicates that the geographic view shall remain unchanged. A value of 1 or true indicates that the geographic view shall be displayed according to the kml:AbstractViewGroup specified by either: •

a kml:NetworkLinkControl

a child kml:AbstractFeatureGroup of kml:kml

if they exist in the referenced KML resource. The kml:AbstractViewGroup of the kml:NetworkLinkControl shall take precedence over the kml:AbstractViewGroup of the kml:AbstractFeatureGroup if they both exist. If neither exists then the view shall remain unchanged. 9.12.3.2.2

Content

Type: Default Value:

62

xsd:boolean 0 or false

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

9.12.3.3

kml:Link

Spcifies the location of the KML resource fetched by kml:NetworkLink. See 13.1 kml:Link, kml:Icon (kml:LinkType). 9.12.3.4

kml:NetworkLinkSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 9.12.3.5

kml:NetworkLinkObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution. 9.12.4

Example

<Document> <visibility>1</visibility> <NetworkLink> <name>NE US Radar</name> <refreshVisibility>1</refreshVisibility> <flyToView>1</flyToView> <Link>...</Link> </NetworkLink> </Document>

9.13

kml:Region

9.13.1

Structure

<kml:Region id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:LatLonAltBox> ... </kml:LatLonAltBox> [0..1] <kml:Lod> ... </kml:Lod> [0..1] <kml:RegionSimpleExtensionGroup> ... </kml:RegionSimpleExtensionGroup> [0..*] <kml:RegionObjectExtensionGroup> ... </kml:RegionObjectExtensionGroup> [0..*] </kml:Region>

9.13.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractObjectGroup

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

63

OGC 07-147r2

Affects the visibility of the kml:AbstractFeatureGroup. A kml:AbstractFeatureGroup associated with a kml:Region is drawn only when the kml:Region is active. A kml:Region affects visibility of a kml:AbstractFeatureGroup. kml:Regions define both culling and level-of-detail control over the display of the kml:AbstractFeatureGroup. A region shall specify a kml:LatLonAltBox element that describes an area of interest defined by geographic coordinates and altitudes. In addition, a kml:Region contains a kml:Lod element that defines a validity range of the associated kml:Region in terms of projected screen size. Regions are inherited through a kml:AbstractFeatureGroup hierarchy and affect the visibility of kml:AbstractFeatureGroup elements that are defined lower in the hierarchy. A kml:Region is said to be "active" when the bounding box is within the user's view and the LOD requirements are met. kml:AbstractFeatureGroup elements associated with a kml:Region are drawn only when the kml:Region is active. When the kml:viewRefreshMode is onRegion, the kml:Link or kml:Icon is loaded only when the kml:Region is active. In a kml:AbstractContainerGroup or kml:NetworkLink hierarchy, this calculation uses the kml:Region that is the closest ancestor in the hierarchy. See also 9.6 kml:AbstractContainerGroup regarding the inheritance of kml:Region within KML feature hierarchies. kml:Region shall contain the kml:LatLonAltBox and kml:Lod child elements outside of an update context, that is when not a descendant of kml:Update.

9.13.3 9.13.3.1

Content kml:LatLonAltBox

See 9.15 kml:LatLonAltBox. 9.13.3.2

kml:Lod

See 9.18 kml:Lod. 9.13.3.3

kml:RegionSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 9.13.3.4

kml:RegionObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

64

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

9.13.4

Example

<Region> <LatLonAltBox> <north>50.625</north> <south>45</south> <east>28.125</east> <west>22.5</west> <minAltitude>10</minAltitude> <maxAltitude>50</maxAltitude> </LatLonAltBox> <Lod> <minLodPixels>128</minLodPixels> <maxLodPixels>1024</maxLodPixels> <minFadeExtent>128</minFadeExtent> <maxFadeExtent>128</maxFadeExtent> </Lod> </Region>

9.14

kml:AbstractLatLonAltBox

9.14.1

Structure

<kml:AbstractLatLonBox id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:north> ... </kml:north> [0..1] <kml:south> ... </kml:south> [0..1] <kml:east> ... </kml:east> [0..1] <kml:west> ... </kml:west> [0..1] <kml:AbstractLatLonBoxSimpleExtensionGroup> ... </kml:AbstractLatLonBoxSimpleExtensionGroup> [0..*] <kml:AbstractLatLonBoxObjectExtensionGroup> ... </kml:AbstractLatLonBoxObjectExtensionGroup> [0..*] </kml:AbstractLatLonBox>

9.14.2

Description Abstract:

yes

This element can be used wherever the following element is referenced: •

kml:AbstractObjectGroup

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

65

OGC 07-147r2

9.14.3

Content

9.14.3.1

kml:north

9.14.3.1.1

Description

Specifies the latitude of the north edge of the bounding box, in decimal degrees from 0 to ±90. 9.14.3.1.2

Content

Type: Default Value: 9.14.3.2

kml:south

9.14.3.2.1

Description

kml:angle180Type 180.0

Specifies the latitude of the south edge of the bounding box, in decimal degrees from 0 to ±90. 9.14.3.2.2

Content

Type: Default Value: 9.14.3.3

kml:east

9.14.3.3.1

Description

kml:angle180Type -180.0

Specifies the longitude of the east edge of the bounding box, in decimal degrees from 0 to ±180. For overlays that overlap the meridian of 180° longitude, values can extend beyond that range. 9.14.3.3.2

Content

Type: Default Value:

66

kml:angle180Type 180.0

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

9.14.3.4

kml:west

9.14.3.4.1

Description

Specifies the longitude of the west edge of the bounding box, in decimal degrees from 0 to ±180. For overlays that overlap the meridian of 180° longitude, values can extend beyond that range. 9.14.3.4.2

Content

Type: Default Value: 9.14.3.5

kml:angle180Type -180.0

kml:AbstractLatLonBoxSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 9.14.3.6

kml: AbstractLatLonBoxObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

67

OGC 07-147r2

9.15

kml:LatLonAltBox

9.15.1

Structure

<kml:LatLonAltBox id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:north> ... </kml:north> [0..1] <kml:south> ... </kml:south> [0..1] <kml:east> ... </kml:east> [0..1] <kml:west> ... </kml:west> [0..1] <kml:AbstractLatLonBoxSimpleExtensionGroup> ... </kml:AbstractLatLonBoxSimpleExtensionGroup> [0..*] <kml:AbstractLatLonBoxObjectExtensionGroup> ... </kml:AbstractLatLonBoxObjectExtensionGroup> [0..*] <kml:minAltitude> ... </kml:minAltitude> [0..1] <kml:maxAltitude> ... </kml:maxAltitude> [0..1] <kml:altitudeModeGroup> ... </kml:altitudeModeGroup> [0..1] <kml:LatLonAltBoxSimpleExtensionGroup> ... </kml:LatLonAltBoxSimpleExtensionGroup> [0..*] <kml:LatLonAltBoxObjectExtensionGroup> ... </kml:LatLonAltBoxObjectExtensionGroup> [0..*] </kml:LatLonAltBox>

9.15.2

Description

This element can be used wherever the following element is referenced: • NOTE:

kml:AbstractObjectGroup The schema type for kml:LatLonAltBox derives by extension from the schema type for kml:AbstractLatLonAltBoxGroup, even though it does not substitute for it.

Specifies the extent of a 3D bounding box, such that:

68

kml:north is greater than kml:south;

kml:east is greater than kml:west;

kml:minAltitude is less than or equal to kml:maxAltitude;

if kml:minAltitude and kml:maxAltitude are both present, kml:altitudeMode shall not have a value of clampToGround.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

9.15.3

Content

9.15.3.1

minAltitude

9.15.3.1.1

Description

Specified in meters above the vertical datum (and is affected by the kml:altitudeMode specification). 9.15.3.1.2

Content

Type: Default Value: 9.15.3.2

maxAltitude

9.15.3.2.1

Description

xsd: double 0.0

Specified in meters above the vertical datum (and is affected by the kml:altitudeMode specification). 9.15.3.2.2

Content

Type: Default Value: 9.15.3.3

xsd: double 0.0

altitudeModeGroup

See 9.17 kml:altitudeMode. 9.15.3.4

kml:LatLonAltBoxSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 9.15.3.5

kml:LatLonAltBoxObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

69

OGC 07-147r2

9.15.4

Example

<LatLonAltBox> <north>43.374</north> <south>42.983</south> <east>-0.335</east> <west>-1.423</west> <minAltitude>0</minAltitude> <maxAltitude>0</maxAltitude> </LatLonAltBox>

9.16

kml:altitudeModeGroup

9.16.1

Structure

<kml:altitudeModeGroup> ... </kml:altitudeModeGroup>

9.16.2

Description Abstract:

yes

The following elements can be used wherever this element is referenced: •

kml:altitudeMode

Specifies how altitude components are interpreted. See also 9.17 kml:altitudeMode and 6.3 Geometry Interpolation for 3D Earth Browsers. 9.16.3

Content Type: Default Value:

9.17

xsd:anyType none

kml:altitudeMode

9.17.1

Structure

<kml:altitudeMode> ... </kml:altitudeMode>

9.17.2

Description

This element can be used wherever the following element is referenced: •

70

kml:altitudeModeGroup

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

Specifies how altitude components are interpreted. If kml:altitudeMode is set to relativeToGround or absolute, altitude components should exist within the coordinate tuples to which it applies. See also 6.3 Geometry Interpolation for 3D Earth Browsers. 9.17.3

Content Type: Default Value:

9.18

kml:altitudeModeEnumType clampToGround

kml:Lod

9.18.1

Structure

<kml:Lod id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:minLodPixels> ... </kml:minLodPixels> [0..1] <kml:maxLodPixels> ... </kml:maxLodPixels> [0..1] <kml:minFadeExtent> ... </kml:minFadeExtent> [0..1] <kml:maxFadeExtent> ... </kml:maxFadeExtent> [0..1] <kml:LodSimpleExtensionGroup> ... </kml:LodSimpleExtensionGroup> [0..*] <kml:LodObjectExtensionGroup> ... </kml:LodObjectExtensionGroup> [0..*] </kml:Lod>

9.18.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractObjectGroup

Specifies the level of detail to use when displaying a kml:Region. An earth browser should calculate the size of the kml:Region when projected onto screen space then compute the square root of the kml:Region's area. For example, if an untiled kml:Region is square and the viewpoint is directly above the kml:Region, this measurement is equal to the width of the projected kml:Region. If this measurement falls within the limits defined by kml:minLodPixels and kml:maxLodPixels, and if the kml:LatLonAltBox is in view, then the kml:Region should be activated. If this limit is not reached, the associated geometry should not be drawn since it would be too far from the user's viewpoint to be visible. kml:minLodPixels shall be less than kml:maxLodPixels (where a value of -1 = infinite). It is also advised that kml:minFadeExtent + kml:maxFadeExtent is less than or equal to kml:maxLodPixels - kml:minLodPixels.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

71

OGC 07-147r2

The following diagram demonstrates how kml:Lod is used in the determination of the visibility of a region:

In the following diagram, if P=the calculated projected pixel size, the circled numbers indicate the following: if (P < minLodPixels) opacity=0 else if(P < minLodPixels + minFadeExtent) opacity=(P - minLodPixels)/minFadeExtent else if (P < maxLodPixels - maxFadeExtent) opacity=1 else if (P < maxLodPixels) opacity=(maxLodPixels-P)/maxFadeExtent else opacity=0

//#1 in diagram //#2 in diagram //#3 in diagram //#4 in diagram //#5 in diagram

kml:Lod shall contain the kml:minLodPixels outside of an update context, that is when not a descendant of kml:Update.

See also 9.13 kml:Region.

72

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

9.18.3

Content

9.18.3.1

kml:minLodPixels

9.18.3.1.1

Description

Measurement in screen pixels that represents the minimum limit of the visibility range for a given kml:Region. 9.18.3.1.2

Content

Type: Default Value:

xsd:double 0.0

9.18.3.2

kml:maxLodPixels

9.18.3.2.1

Description

Measurement in screen pixels that represents the maximum limit of the visibility range for a given kml:Region. The default value of −1.0 indicates "active to infinite size." 9.18.3.2.2

Content

Type: Default Value:

xsd:double -1.0

9.18.3.3

kml:minFadeExtent

9.18.3.3.1

Description

Distance over which the geometry fades, from fully opaque to fully transparent. This ramp value, expressed in screen pixels, is applied at the minimum end of the LOD (visibility) limits. 9.18.3.3.2

Content

Type: Default Value:

xsd:double 0.0

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

73

OGC 07-147r2

9.18.3.4

kml:maxFadeExtent

9.18.3.4.1

Description

Distance over which the geometry fades, from fully transparent to fully opaque. This ramp value, expressed in screen pixels, is applied at the maximum end of the LOD (visibility) limits. 9.18.3.4.2

Content

Type: Default Value: 9.18.3.5

xsd:double 0.0

kml:LodSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 9.18.3.6

kml:LodObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution. 9.18.4

Example

<Region> <LatLonAltBox> <north>50.625</north> <south>45</south> <east>28.125</east> <west>22.5</west> <minAltitude>10</minAltitude> <maxAltitude>50</maxAltitude> </LatLonAltBox> <Lod> <minLodPixels>128</minLodPixels> <maxLodPixels>1024</maxLodPixels> <minFadeExtent>128</minFadeExtent> <maxFadeExtent>128</maxFadeExtent> </Lod> </Region>

74

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

10 Geometries

10.1

kml:AbstractGeometryGroup

10.1.1

Structure

<kml:AbstractGeometryGroup id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractGeometrySimpleExtensionGroup> ... </kml:AbstractGeometrySimpleExtensionGroup> [0..*] <kml:AbstractGeometryObjectExtensionGroup> ... </kml:AbstractGeometryObjectExtensionGroup> [0..*] </kml:AbstractGeometryGroup>

10.1.2

Description Abstract:

yes

This element can be used wherever the following element is referenced: •

kml:AbstractObjectGroup

The following elements can be used wherever this element is referenced: •

kml:MultiGeometry

kml:Point

kml:LineString

kml:LinearRing

kml:Polygon

kml:Model

10.1.3 10.1.3.1

Content kml:AbstractGeometrySimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 10.1.3.2

kml:AbstractGeometryObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

75

OGC 07-147r2

10.2

kml:MultiGeometry

10.2.1

Structure

<kml:MultiGeometry id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractGeometrySimpleExtensionGroup> ... </kml:AbstractGeometrySimpleExtensionGroup> [0..*] <kml:AbstractGeometryObjectExtensionGroup> ... </kml:AbstractGeometryObjectExtensionGroup> [0..*] <kml:AbstractGeometryGroup> ... </kml:AbstractGeometryGroup> [0..*] <kml:MultiGeometrySimpleExtensionGroup> ... </kml:MultiGeometrySimpleExtensionGroup> [0..*] <kml:MultiGeometryObjectExtensionGroup> ... </kml:MultiGeometryObjectExtensionGroup> [0..*] </kml:MultiGeometry>

10.2.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractGeometryGroup

A container for zero or more geometry elements associated with the same KML feature. A kml:MultiGeometry element should contain more than one kml:AbstractGeometryGroup element outside of an update context, that is when not a descendant of kml:Update. 10.2.3 10.2.3.1

Content kml:AbstractGeometryGroup

See 10.1 kml:AbstractGeometryGroup. 10.2.3.2

kml:AbstractGeometrySimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 10.2.3.3

kml:AbstractGeometryObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

76

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

10.2.4

Example

<Placemark> <name>SF Marina Harbor Master</name> <visibility>0</visibility> <MultiGeometry> <LineString> <!-- north wall --> <coordinates> -122.4425587930444,37.80666418607323,0 -122.4428379594768,37.80663578323093,0 </coordinates> </LineString> <LineString> <!-- south wall --> <coordinates> -122.4425509770566,37.80662588061205,0 -122.4428340530617,37.8065999493009,0 </coordinates> </LineString> </MultiGeometry> </Placemark>

10.3

kml:Point

10.3.1

Structure

<kml:Point id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractGeometrySimpleExtensionGroup> ... </kml:AbstractGeometrySimpleExtensionGroup> [0..*] <kml:AbstractGeometryObjectExtensionGroup> ... </kml:AbstractGeometryObjectExtensionGroup> [0..*] <kml:extrude> ... </kml:extrude> [0..1] <kml:altitudeModeGroup> ... </kml:altitudeModeGroup> [0..1] <kml:coordinates> ... </kml:coordinates> [0..1] <kml:PointSimpleExtensionGroup> ... </kml:PointSimpleExtensionGroup> [0..*] <kml:PointObjectExtensionGroup> ... </kml:PointObjectExtensionGroup> [0..*] </kml:Point>

10.3.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractGeometryGroup

A geographic location defined by a single geodetic longitude, geodetic latitude, and (optional) altitude coordinate tuple.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

77

OGC 07-147r2

10.3.3

Content

10.3.3.1

kml:extrude

10.3.3.1.1

Description

Specifies whether to connect the point to the ground with a line when displayed in the geographic view. See 10.4 kml:extrude. 10.3.3.2

kml:altitudeModeGroup

See 9.16 kml:altitudeModeGroup and 9.17 kml:altitudeMode. 10.3.3.3

kml:coordinates

10.3.3.3.1

Description

A single coordinate tuple. 10.3.3.3.2

Content

Type: Default Value: 10.3.3.4

kml:coordinatesType none

kml:PointSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 10.3.3.5

kml:PointObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

78

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

10.3.4

Example

<Point> <coordinates>-90.86948943473118,48.25450093195546</coordinates> </Point>

10.4

kml:extrude

10.4.1.1.1

Structure

<kml:extrude> ... </kml:extrude>

10.4.1.1.2

Description

Specifies whether to connect a geometry to the ground. To extrude a geometry, the kml:altitudeMode shall be either relativeToGround or absolute, and the altitude component within the kml:coordinates element should be greater than 0 (that is, in the air). The geometry is extruded toward the Earth's center of mass. See also 6.3 Geometry Interpolation for 3D Earth Browsers. 10.4.1.1.3

Content

Type: Default Value:

xsd:boolean 0 or false

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

79

OGC 07-147r2

10.5

kml:LinearRing

10.5.1

Structure

<kml:LinearRing id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractGeometrySimpleExtensionGroup> ... </kml:AbstractGeometrySimpleExtensionGroup> [0..*] <kml:AbstractGeometryObjectExtensionGroup> ... </kml:AbstractGeometryObjectExtensionGroup> [0..*] <kml:extrude> ... </kml:extrude> [0..1] <kml:tessellate> ... </kml:tessellate> [0..1] <kml:altitudeModeGroup> ... </kml:altitudeModeGroup> [0..1] <kml:coordinates> ... </kml:coordinates> [0..1] <kml:LinearRingSimpleExtensionGroup> ... </kml:LinearRingSimpleExtensionGroup> [0..*] <kml:LinearRingObjectExtensionGroup> ... </kml:LinearRingObjectExtensionGroup> [0..*] </kml:LinearRing>

10.5.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractGeometryGroup

Defines a closed line string that should not cross itself. kml:extrude, kml:tessellate and kml:altitudeModeGroup (kml:altitudeMode) elements should not be specified when kml:LinearRing is used to define a boundary for a kml:Polygon.

10.5.3 10.5.3.1

Content kml:extrude

See 10.4 kml:extrude. 10.5.3.2

kml:tessellate

See 10.6 kml:tessellate. 10.5.3.3

kml:altitudeModeGroup

See 9.16 kml:altitudeModeGroup and 9.17 kml:altitudeMode.

80

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

10.5.3.4

kml:coordinates

10.5.3.4.1

Description

A list of four or more coordinate tuples where the first and last coordinate tuples must be the same. 10.5.3.4.2

Content

Type: Default Value: 10.5.3.5

kml:coordinatesType none

kml:LinearRingSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 10.5.3.6

kml:LinearRingObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

81

OGC 07-147r2

10.5.4

Example

<kml xmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>LinearRing.kml</name> <Polygon> <outerBoundaryIs> <LinearRing> <coordinates> -122.365662,37.826988,0 -122.365202,37.826302,0 -122.364581,37.82655,0 -122.365038,37.827237,0 -122.365662,37.826988,0 </coordinates> </LinearRing> </outerBoundaryIs> </Polygon> </Placemark> </kml>

10.6

kml:tessellate

10.6.1

Structure

<kml:tessellate> ... </kml:tessellate>

10.6.2

Description

Specifies whether to drape a geometry over the terrain. A value of 1 or true specifies to drape; a value of 0 or false specifies not to drape. To enable tessellation, the value for kml:altitudeMode shall be clampToGround. See also 6.3 Geometry Interpolation for 3D Earth Browsers. 10.6.3

Content Type: Default Value:

82

xsd:boolean 0 or false

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

10.7

kml:LineString

10.7.1

Structure

<kml:LineString id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractGeometrySimpleExtensionGroup> ... </kml:AbstractGeometrySimpleExtensionGroup> [0..*] <kml:AbstractGeometryObjectExtensionGroup> ... </kml:AbstractGeometryObjectExtensionGroup> [0..*] <kml:extrude> ... </kml:extrude> [0..1] <kml:tessellate> ... </kml:tessellate> [0..1] <kml:altitudeModeGroup> ... </kml:altitudeModeGroup> [0..1] <kml:coordinates> ... </kml:coordinates> [0..1] <kml:LineStringSimpleExtensionGroup> ... </kml:LineStringSimpleExtensionGroup> [0..*] <kml:LineStringObjectExtensionGroup> ... </kml:LineStringObjectExtensionGroup> [0..*] </kml:LineString>

10.7.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractGeometryGroup

Defines a list of one or more contiguous line segments. 10.7.3 10.7.3.1

Content kml:extrude

Specifies whether to extend the kml:LineString to the ground when displayed in the geographic view. When a kml:LineString is extruded, the points of each line segment are extended to the terrain toward the Earth's center of mass, forming a polygon that looks like a wall or fence. See 10.4 kml:extrude. 10.7.3.2

kml:tessellate

See 10.6 kml:tessellate. 10.7.3.3

kml:altitudeModeGroup

See 9.16 kml:altitudeModeGroup and 9.17 kml:altitudeMode.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

83

OGC 07-147r2

10.7.3.4

kml:coordinates

10.7.3.4.1

Description

Two or more coordinate tuples. 10.7.3.4.2

Content

Type: Default Value: 10.7.3.5

kml:coordinatesType none

kml:LineStringSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 10.7.3.6

kml:LineStringObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

84

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

10.7.4

Example

<kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <name>LineString.kml</name> <open>1</open> <LookAt> <longitude>-122.36415</longitude> <latitude>37.824553</latitude> <altitude>0</altitude> <range>150</range> <tilt>50</tilt> <heading>0</heading> </LookAt> <Placemark> <name>unextruded</name> <LineString> <extrude>0</extrude> <tessellate>1</tessellate> <coordinates> -122.364383,37.824664,0 -122.364152,37.824322,0 </coordinates> </LineString> </Placemark> <Placemark> <name>extruded</name> <LineString> <extrude>1</extrude> <tessellate>1</tessellate> <altitudeMode>relativeToGround</altitudeMode> <coordinates> -122.364167,37.824787,50 -122.363917,37.824423,50 </coordinates> </LineString> </Placemark> </Document> </kml>

10.8

kml:Polygon

10.8.1

Structure

<kml:Polygon id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractGeometrySimpleExtensionGroup> ... </kml:AbstractGeometrySimpleExtensionGroup> [0..*] <kml:AbstractGeometryObjectExtensionGroup> ... </kml:AbstractGeometryObjectExtensionGroup> [0..*] <kml:extrude> ... </kml:extrude> [0..1] <kml:tessellate> ... </kml:tessellate> [0..1] <kml:altitudeModeGroup> ... </kml:altitudeModeGroup> [0..1] <kml:outerBoundaryIs> ... </kml:outerBoundaryIs> [0..1] <kml:innerBoundaryIs> ... </kml:innerBoundaryIs> [0..*] <kml:PolygonSimpleExtensionGroup> ... </kml:PolygonSimpleExtensionGroup> [0..*] <kml:PolygonObjectExtensionGroup> ... </kml:PolygonObjectExtensionGroup> [0..*]

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

85

OGC 07-147r2

</kml:Polygon>

10.8.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractGeometryGroup

A kml:Polygon shall have an outer boundary ring outside of an update context, that is when not a descendant of kml:Update. It may have 0 or more inner boundary rings. Each ring is defined by a kml:LinearRing. It is advised that the rings not cross each other. 10.8.3

Content

10.8.3.1

kml:extrude

10.8.3.1.1

Description

Specifies whether to connect the kml:Polygon to the ground when displayed in the geographic view. When a kml:Polygon is extruded, each boundary point is extended to the terrain toward the earth's center of mass, which gives the appearance of a building or a box. Only the kml:Polygon boundary is extruded, not the kml:Polygon interior (for example, a rectangle turns into a box with five faces). See 10.4 kml:extrude. 10.8.3.2

kml:tessellate

See 10.6 kml:tessellate. 10.8.3.3

kml:altitudeModeGroup

See 9.16 kml:altitudeModeGroup and 9.17 kml:altitudeMode. 10.8.3.4

kml:outerBoundaryIs

Specifies the exterior boundary of the kml:Polygon defined by a kml:LinearRing element. See 10.5 kml:LinearRing.

86

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

10.8.3.5

kml:innerBoundaryIs

Specifies an inner boundary of the kml:Polygon defined by a kml:LinearRing element. See 10.5 kml:LinearRing. 10.8.3.6

kml:PolygonSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 10.8.3.7

kml:PolygonObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

87

OGC 07-147r2

10.8.4

Example

<kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <name>Polygon.kml</name> <open>0</open> <Placemark> <name>hollow box</name> <Polygon> <extrude>1</extrude> <altitudeMode>relativeToGround</altitudeMode> <outerBoundaryIs> <LinearRing> <coordinates> -122.366278,37.818844,30 -122.365248,37.819267,30 -122.365640,37.819861,30 -122.366669,37.819429,30 -122.366278,37.818844,30 </coordinates> </LinearRing> </outerBoundaryIs> <innerBoundaryIs> <LinearRing> <coordinates> -122.366212,37.818977,30 -122.365424,37.819294,30 -122.365704,37.819731,30 -122.366488,37.819402,30 -122.366212,37.818977,30 </coordinates> </LinearRing> </innerBoundaryIs> </Polygon> </Placemark> </Document> </kml>

10.9

kml:Model

10.9.1

Structure

<kml:Model id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractGeometrySimpleExtensionGroup> ... </kml:AbstractGeometrySimpleExtensionGroup> [0..*] <kml:AbstractGeometryObjectExtensionGroup> ... </kml:AbstractGeometryObjectExtensionGroup> [0..*] <kml:altitudeModeGroup> ... </kml:altitudeModeGroup> [0..1] <kml:Location> ... </kml:Location> [0..1] <kml:Orientation> ... </kml:Orientation> [0..1] <kml:Scale> ... </kml:Scale> [0..1] <kml:Link> ... </kml:Link> [0..1] <kml:ResourceMap> ... </kml:ResourceMap> [0..1] <kml:ModelSimpleExtensionGroup> ... </kml:ModelSimpleExtensionGroup> [0..*]

88

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<kml:ModelObjectExtensionGroup> ... </kml:ModelObjectExtensionGroup> [0..*] </kml:Model>

10.9.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractGeometryGroup

Specifies the location and orientation of a textured 3D object resource. The structure and appearance of the textured 3D object are not defined in this specification. A local earth-fixed frame (X’-Y’-Z’) is defined as follows. The Z'-axis is defined by the local surface normal (local to the tangent plane at the location point), the Y'-axis is defined by the intersection of the meridian plane defined by the longitude of the location point, and the tangent plane, and the X'-axis is chosen so that X'-Y'Z' form a right handed orthogonal frame. A model-fixed frame (X-Y-Z) is defined as follows. The Y-axis is +ve through the front of the model. The Z-axis is +ve through the top of the model and the X-axis is chosen so that X-Y-Z forms a right handed orthogonal frame. The orientation of the model is then defined by the orientation of the model-fixed frame (XY-Z) relative to the local earth-fixed frame (X’-Y’-Z’) as follows:

Roll – rotation about the model Y-axis

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

89

OGC 07-147r2

Tilt – rotation about the model X-axis

Heading – Rotation about the model Z-axis kml:Model:

shall contain kml:Link and kml:Location elements;

shall contain a kml:ResourceMap element that has a kml:Alias element for each texture file, if the target resource has texture files;

outside of an update context, that is when not a descendant of kml:Update.

90

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

10.9.3 10.9.3.1

Content kml:altitudeModeGroup

See 9.17 kml:altitudeMode. 10.9.3.2

kml:Location

10.9.3.2.1

Description

Specifies the coordinates of the kml:Model's origin. See 10.10 kml:Location. 10.9.3.3

kml:Orientation

10.9.3.3.1

Description

Specifies the orientation of the model coordinate axes relative to a local earth-fixed reference frame. See 10.11 kml:Orientation. 10.9.3.4

kml:Scale

10.9.3.4.1

Description

Scales a model along the x, y, and z axes in the model's coordinate space. See 10.12 kml:Scale. 10.9.3.5

kml:Link

10.9.3.5.1

Description

Specifies the location of a textured 3D object resource such as a COLLADA file. See 13.1 kml:Link, kml:Icon (kml:LinkType).

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

91

OGC 07-147r2

10.9.3.6

kml:ResourceMap

10.9.3.6.1

Description

Specifies 0 or more kml:Alias elements, each of which is a mapping for the texture file path from the original textured 3D object file to the KML or KMZ resource that contains the kml:Model. See 10.13 kml:ResourceMap. 10.9.3.7

kml:ModelSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 10.9.3.8

kml:ModelObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

92

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

10.9.4

Example

<Model id="khModel543"> <altitudeMode>relativeToGround</altitudeMode> <Location> <longitude>39.55375305703105</longitude> <latitude>-118.9813220168456</latitude> <altitude>1223</altitude> </Location> <Orientation> <heading>45.0</heading> <tilt>10.0</tilt> <roll>0.0</roll> </Orientation> <Scale> <x>1.0</x> <y>1.0</y> <z>1.0</z> </Scale> <Link> <href>house.dae</href> </Link> <ResourceMap> <Alias> <targetHref>../files/CU-Macky---Center-StairsnoCulling.jpg</targetHref> <sourceHref>CU-Macky---Center-StairsnoCulling.jpg</sourceHref> </Alias> <Alias> <targetHref>../files/CU-Macky-4sideturretnoCulling.jpg</targetHref> <sourceHref>CU-Macky-4sideturretnoCulling.jpg</sourceHref> </Alias> <Alias> <targetHref>../files/CU-Macky-Back-NorthnoCulling.jpg</targetHref> <sourceHref>CU-Macky-Back-NorthnoCulling.jpg</sourceHref> </Alias> </ResourceMap> </Model>

10.10 kml:Location 10.10.1 Structure <kml:Location id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:longitude> ... </kml:longitude> [0..1] <kml:latitude> ... </kml:latitude> [0..1] <kml:altitude> ... </kml:altitude> [0..1] <kml:LocationSimpleExtensionGroup> ... </kml:LocationSimpleExtensionGroup> [0..*] <kml:LocationObjectExtensionGroup> ... </kml:LocationObjectExtensionGroup> [0..*] </kml:Location>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

93

OGC 07-147r2

10.10.2 Description This element can be used wherever the following element is referenced: •

kml:AbstractObjectGroup

Specifies the coordinates of a location. A kml:Location element should contain the kml:longitude, kml:latitude child elements outside of an update context, that is when not a descendant of kml:Update. 10.10.3 Content 10.10.3.1 kml:latitude 10.10.3.1.1 Description

Geodetic latitude of origin in decimal degrees. 10.10.3.1.2 Content

Type: Default Value:

kml:angle180Type 0.0

10.10.3.2 kml:longitude 10.10.3.2.1 Description

Geodetic longitude of origin in decimal degrees. 10.10.3.2.2 Content

Type: Default Value:

kml:angle90Type 0.0

10.10.3.3 kml:altitude 10.10.3.3.1 Description

Altitude of origin measured in meters and interpreted according to kml:altitudeMode. 10.10.3.3.2 Content

Type: 94

xsd:double Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

Default Value:

0.0

10.10.3.4 kml:LocationSimpleExtensionGroup See 6.6.3.1 Simple Element Substitution. 10.10.3.5 kml:LocationObjectExtensionGroup See 6.6.3.2 Complex Element Substitution. 10.10.4 Example <Location> <longitude>39.55375305703105</longitude> <latitude>-118.9813220168456</latitude> <altitude>1223</altitude> </Location>

10.11 kml:Orientation 10.11.1 Structure <kml:Orientation id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:heading> ... </kml:heading> [0..1] <kml:tilt> ... </kml:tilt> [0..1] <kml:roll> ... </kml:roll> [0..1] <kml:OrientationSimpleExtensionGroup> ... </kml:OrientationSimpleExtensionGroup> [0..*] <kml:OrientationObjectExtensionGroup> ... </kml:OrientationObjectExtensionGroup> [0..*] </kml:Orientation>

10.11.2 Description This element can be used wherever the following element is referenced: •

kml:AbstractObjectGroup

Specifies the orientation of the model coordinate axes relative to a local earth-fixed reference frame. kml:Orientation should contain at least one child element outside of an update context, that is when not a descendant of kml:Update. It is advised that kml:heading, kml:tile and kml:roll all be specified.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

95

OGC 07-147r2

10.11.3 Content 10.11.3.1 kml:heading 10.11.3.1.1 Description

Rotation about the z axis. A value of 0 equals North. A positive rotation is counter clockwise around the positive z axis, looking along the z-axis away from the origin, and specified in decimal degrees from 0 to ±180. 10.11.3.1.2 Content

Type: Default Value:

kml:angle360Type 0.0

10.11.3.2 kml:tilt 10.11.3.2.1 Description

Rotation about the x axis. A positive rotation is counter clockwise around the positive x axis and specified in decimal degrees from 0 to ±180. 10.11.3.2.2 Content

Type: Default Value:

kml:anglepos180Type 0.0

10.11.3.3 kml:roll 10.11.3.3.1 Description

Rotation about the y axis. A positive rotation is counter clockwise around the positive y axis and specified in decimal degrees from 0 to ±180. 10.11.3.3.2 Content

Type: Default Value:

kml:angle180Type 0.0

10.11.3.4 kml:OrientationSimpleExtensionGroup See 6.6.3.1 Simple Element Substitution.

96

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

10.11.3.5 kml:OrientationObjectExtensionGroup See 6.6.3.2 Complex Element Substitution. 10.11.4 Defining Orientation

This diagram illustrates the initial orientation of a model's axes:

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

97

OGC 07-147r2

10.11.5 Example <Orientation> <heading>45.0</heading> <tilt>10.0</tilt> <roll>0.0</roll> </Orientation>

10.12 kml:Scale 10.12.1 Structure <kml:Scale id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:x> ... </kml:x> [0..1] <kml:y> ... </kml:y> [0..1] <kml:z> ... </kml:z> [0..1] <kml:ScaleSimpleExtensionGroup> ... </kml:ScaleSimpleExtensionGroup> [0..*] <kml:ScaleObjectExtensionGroup> ... </kml:ScaleObjectExtensionGroup> [0..*] </kml:Scale>

10.12.2 Description This element can be used wherever the following element is referenced: •

kml:AbstractObjectGroup

Scales a model along the x, y, and z axes in the model's coordinate space. kml:Scale should contain at least one child element outside of an update context, that is when not a descendant of kml:Update. It is advised that kml:x, kml:y, and kml:z all be

specified. 10.12.3 Content 10.12.3.1 x 10.12.3.1.1 Description

Scale factor along x axis. 10.12.3.1.2 Content

Type:

98

xsd:double

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

Default Value:

1.0

10.12.3.2 y 10.12.3.2.1 Description

Scale factor along y axis. 10.12.3.2.2 Content

Type: Default Value:

xsd:double 1.0

10.12.3.3 z 10.12.3.3.1 Description

Scale factor along z axis. 10.12.3.3.2 Content

Type: Default Value:

xsd:double 1.0

10.12.3.4 kml:ScaleSimpleExtensionGroup See 6.6.3.1 Simple Element Substitution. 10.12.3.5 kml:ScaleObjectExtensionGroup See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

99

OGC 07-147r2

10.12.4 Example <Scale> <x>2.5</x> <y>2.5</y> <z>3.5</z> </Scale>

10.13 kml:ResourceMap 10.13.1 Structure <kml:ResourceMap id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:Alias> ... </kml:Alias> [0..*] <kml:ResourceMapSimpleExtensionGroup> ... </kml:ResourceMapSimpleExtensionGroup> [0..*] <kml:ResourceMapObjectExtensionGroup> ... </kml:ResourceMapObjectExtensionGroup> [0..*] </kml:ResourceMap>

10.13.2 Description This element can be used wherever the following element is referenced: •

kml:AbstractObjectGroup

Should specify at least one or more kml:Alias elements outside of an update context, that is when not a descendant of kml:Update. Each kml:Alias element is a mapping for the texture file path from the original textured 3D object file to the KML or KMZ resource that contains the kml:Model. This element allows texture files to be moved and renamed without having to update the original textured 3D object file that references those textures. One kml:ResourceMap element can contain multiple mappings from different source textured object files into the same target resource. Each child kml:Alias element should have a unique child kml:sourceHref element . 10.13.3 Content 10.13.3.1 kml:Alias See 10.14 kml:Alias.

100

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

10.13.3.2 kml:ResourceMapSimpleExtensionGroup See 6.6.3.1 Simple Element Substitution. 10.13.3.3 kml: ResourceMapExtensionGroup See 6.6.3.2 Complex Element Substitution.

10.14 kml:Alias 10.14.1 Structure <kml:Alias id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:targetHref> ... </kml:targetHref> [0..1] <kml:sourceHref> ... </kml:sourceHref> [0..1] <kml:AliasSimpleExtensionGroup> ... </kml:AliasSimpleExtensionGroup> [0..*] <kml:AliasObjectExtensionGroup> ... </kml:AliasObjectExtensionGroup> [0..*] </kml:Alias>

10.14.2 Description This element can be used wherever the following element is referenced: •

kml:AbstractObjectGroup

Contains a mapping from kml:sourceHref to kml:targetHref. Both should be specified ouside of an update context, that is when not a descendant of kml:Update. 10.14.3 Content 10.14.3.1 targetHref 10.14.3.1.1 Description

Specifies the textured 3D object file to be fetched by an earth browser. This reference can be a relative reference to an image file within a KMZ file, or it can be an absolute reference to the file (for example, a URL). 10.14.3.1.2 Content

Type:

xsd:anyURI

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

101

OGC 07-147r2

Default Value:

none

10.14.3.2 sourceHref 10.14.3.2.1 Description

Specifies the path for the texture file within the textured 3D object. 10.14.3.2.2 Content

Type: Default Value:

xsd:anyURI none

10.14.3.3 kml:AliasSimpleExtensionGroup See 6.6.3.1 Simple Element Substitution. 10.14.3.4 kml:AliasObjectExtensionGroup See 6.6.3.2 Complex Element Substitution. 10.14.4 Example <Alias> <targetHref>../images/foo.jpg</targetHref> <sourceHref>in-geometry-file/foo.jpg</sourceHref> </Alias>

102

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

11 Overlays

11.1

kml:AbstractOverlayGroup

11.1.1

Structure

<kml:AbstractOverlayGroup id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:name> ... </kml:name> [0..1] <kml:visibility> ... </kml:visibility> [0..1] <kml:open> ... </kml:open> [0..1] <atom:author> ... </atom:author> [0..1] <atom:link> ... </atom:link> [0..1] <kml:address> ... </kml:address> [0..1] <xal:AddressDetails> ... </xal:AddressDetails> [0..1] <kml:phoneNumber> ... </kml:phoneNumber> [0..1] <kml:snippet> ... </kml:snippet> [0..1] <kml:description> ... </kml:description> [0..1] <kml:AbstractViewGroup> ... </kml:AbstractViewGroup> [0..1] <kml:AbstractTimePrimitiveGroup> ... </kml:AbstractTimePrimitiveGroup> [0..1] <kml:styleUrl> ... </kml:styleUrl> [0..1] <kml:AbstractStyleSelectorGroup> ... </kml:AbstractStyleSelectorGroup> [0..*] <kml:Region> ... </kml:Region> [0..1] <kml:ExtendedData> ... </kml:ExtendedData> [0..1] <kml:AbstractFeatureSimpleExtensionGroup> ... </kml:AbstractFeatureSimpleExtensionGroup> [0..*] <kml:AbstractFeatureObjectExtensionGroup> ... </kml:AbstractFeatureObjectExtensionGroup> [0..*] <kml:color> ... </kml:color> [0..1] <kml:drawOrder> ... </kml:drawOrder> [0..1] <kml:Icon> ... </kml:Icon> [0..1] <kml:AbstractOverlaySimpleExtensionGroup> ... </kml:AbstractOverlaySimpleExtensionGroup> [0..*] <kml:AbstractOverlayObjectExtensionGroup> ... </kml:AbstractOverlayObjectExtensionGroup> [0..*] </kml:AbstractOverlayGroup>

11.1.2

Description Abstract:

yes

This element can be used wherever the following element is referenced: •

kml:AbstractFeatureGroup

The following elements can be used wherever this element is referenced: •

kml:GroundOverlay

kml:PhotoOverlay

kml: ScreenOverlay

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

103

OGC 07-147r2

Specifies how to display an image specified by kml:Icon. A kml:AbstractOverlayGroup element should contain the kml:Icon element outside of an update context, that is when not a descendant of kml:Update. 11.1.3

Content

11.1.3.1

kml:color

11.1.3.1.1

Description

Specifies the color of the graphic element. 11.1.3.1.2

Content

Type: Default Value:

kml:colorType ffffffff

11.1.3.2

kml:drawOrder

11.1.3.2.1

Description

This element defines the stacking order , relative to the kml:AbstractViewGroup, for overlapping kml:AbstractOverlayGroup elements. kml:AbstractOverlayGroup elements with higher kml:drawOrder values are drawn on top of overlays with lower kml:drawOrder values. 11.1.3.2.2

Content

Type: Default Value: 11.1.3.3

kml:Icon

11.1.3.3.1

Description

xsd:int 0

Specifies the image associated with the kml:AbstractOverlayGroup. If no image is specified or located, a rectangle is drawn using the color and size defined by the ground or screen overlay. See 13.1 kml:Link, kml:Icon (kml:LinkType).

104

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

11.1.3.4

kml:AbstractOverlaySimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 11.1.3.5

kml:AbstractOverlayObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

105

OGC 07-147r2

11.2

kml:GroundOverlay

11.2.1

Structure

<kml:GroundOverlay id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:name> ... </kml:name> [0..1] <kml:visibility> ... </kml:visibility> [0..1] <kml:open> ... </kml:open> [0..1] <atom:author> ... </atom:author> [0..1] <atom:link> ... </atom:link> [0..1] <kml:address> ... </kml:address> [0..1] <xal:AddressDetails> ... </xal:AddressDetails> [0..1] <kml:phoneNumber> ... </kml:phoneNumber> [0..1] <kml:snippet> ... </kml:snippet> [0..1] <kml:description> ... </kml:description> [0..1] <kml:AbstractViewGroup> ... </kml:AbstractViewGroup> [0..1] <kml:AbstractTimePrimitiveGroup> ... </kml:AbstractTimePrimitiveGroup> [0..1] <kml:styleUrl> ... </kml:styleUrl> [0..1] <kml:AbstractStyleSelectorGroup> ... </kml:AbstractStyleSelectorGroup> [0..*] <kml:Region> ... </kml:Region> [0..1] <kml:ExtendedData> ... </kml:ExtendedData> [0..1] <kml:AbstractFeatureSimpleExtensionGroup> ... </kml:AbstractFeatureSimpleExtensionGroup> [0..*] <kml:AbstractFeatureObjectExtensionGroup> ... </kml:AbstractFeatureObjectExtensionGroup> [0..*] <kml:color> ... </kml:color> [0..1] <kml:drawOrder> ... </kml:drawOrder> [0..1] <kml:Icon> ... </kml:Icon> [0..1] <kml:AbstractOverlaySimpleExtensionGroup> ... </kml:AbstractOverlaySimpleExtensionGroup> [0..*] <kml:AbstractOverlayObjectExtensionGroup> ... </kml:AbstractOverlayObjectExtensionGroup> [0..*] <kml:altitude> ... </kml:altitude> [0..1] <kml:altitudeModeGroup> ... </kml:altitudeModeGroup> [0..1] <kml:LatLonBox> ... </kml:LatLonBox> [0..1] <kml:GroundOverlaySimpleExtensionGroup> ... </kml:GroundOverlaySimpleExtensionGroup> [0..*] <kml:GroundOverlayObjectExtensionGroup> ... </kml:GroundOverlayObjectExtensionGroup> [0..*] </kml:GroundOverlay>

11.2.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractOverlayGroup

Specifies how to display an image draped over the terrain.

106

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

11.2.3

Content

11.2.3.1

kml:altitude

11.2.3.1.1

Description

Specifies the distance above the terrain in meters. It shall be interpreted according to kml:altitudeMode. Only kml:altitudeMode clampToGround or absolute values shall be encoded for kml:GroundOverlay. A kml:GroundOverlay element shall contain the kml:Icon and kml:LatLonBox child elements outside of an update context, that is when not a descendant of kml:Update. 11.2.3.1.2

Content

Type: Default Value: 11.2.3.2

xsd:double 0.0

kml:altitudeModeGroup

See 9.16 kml:altitudeModeGroup and 9.17 kml:altitudeMode. 11.2.3.3

kml:LatLonBox

Specifies a bounding box for the overlay. See 11.3 kml:LatLonBox. 11.2.3.4

kml:GroundOverlaySimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 11.2.3.5

kml:GroundOverlayObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

107

OGC 07-147r2

11.2.4

Example

<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <GroundOverlay> <name>GroundOverlay.kml</name> <color>7fffffff</color> <drawOrder>1</drawOrder> <Icon> <href>http://www.google.com/intl/en/images/logo.gif</href> <refreshMode>onInterval</refreshMode> <refreshInterval>86400</refreshInterval> <viewBoundScale>0.75</viewBoundScale> </Icon> <LatLonBox> <north>37.83234</north> <south>37.832122</south> <east>-122.373033</east> <west>-122.373724</west> <rotation>45</rotation> </LatLonBox> </GroundOverlay> </kml>

11.3

kml:LatLonBox

11.3.1

Structure

<kml:LatLonBox id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:north> ... </kml:north> [0..1] <kml:south> ... </kml:south> [0..1] <kml:east> ... </kml:east> [0..1] <kml:west> ... </kml:west> [0..1] <kml:AbstractLatLonBoxSimpleExtensionGroup> ... </kml:AbstractLatLonBoxSimpleExtensionGroup> [0..*] <kml:AbstractLatLonBoxObjectExtensionGroup> ... </kml:AbstractLatLonBoxObjectExtensionGroup> [0..*] <kml:rotation> ... </kml:rotation> [0..1] <kml:LatLonBoxSimpleExtensionGroup> ... </kml:LatLonBoxSimpleExtensionGroup> [0..*] <kml:LatLonBoxObjectExtensionGroup> ... </kml:LatLonBoxObjectExtensionGroup> [0..*] </kml:LatLonBox>

11.3.2

Description

This element can be used wherever the following element is referenced: •

108

kml:AbstractObjectGroup

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

Specifies the extent of a 2D bounding box. kml:north, kml:south, kml:east, and kml:west shall be specified. 11.3.3

Content

11.3.3.1

kml:rotation

11.3.3.1.1

Description

Specifies a rotation of the overlay about its center, in decimal degrees. Values can be ±180, with 0 being North. Rotations are specified in a counterclockwise direction. 11.3.3.1.2

Content

Type: Default Value: 11.3.3.2

kml:angle180Type 0.0

kml:LatLonBoxSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 11.3.3.3

kml:LatLonBoxObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

109

OGC 07-147r2

11.3.4

Example

<LatLonBox> <north>48.25475939255556</north> <south>48.25207367852141</south> <east>-90.86591508839973</east> <west>-90.8714285289695</west> <rotation>39.37878630116985</rotation> </LatLonBox>

11.4 11.4.1

kml:PhotoOverlay Structure

<kml:PhotoOverlay id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:name> ... </kml:name> [0..1] <kml:visibility> ... </kml:visibility> [0..1] <kml:open> ... </kml:open> [0..1] <atom:author> ... </atom:author> [0..1] <atom:link> ... </atom:link> [0..1] <kml:address> ... </kml:address> [0..1] <xal:AddressDetails> ... </xal:AddressDetails> [0..1] <kml:phoneNumber> ... </kml:phoneNumber> [0..1] <kml:snippet> ... </kml:snippet> [0..1] <kml:description> ... </kml:description> [0..1] <kml:AbstractViewGroup> ... </kml:AbstractViewGroup> [0..1] <kml:AbstractTimePrimitiveGroup> ... </kml:AbstractTimePrimitiveGroup> [0..1] <kml:styleUrl> ... </kml:styleUrl> [0..1] <kml:AbstractStyleSelectorGroup> ... </kml:AbstractStyleSelectorGroup> [0..*] <kml:Region> ... </kml:Region> [0..1] <kml:ExtendedData> ... </kml:ExtendedData> [0..1] <kml:AbstractFeatureSimpleExtensionGroup> ... </kml:AbstractFeatureSimpleExtensionGroup> [0..*] <kml:AbstractFeatureObjectExtensionGroup> ... </kml:AbstractFeatureObjectExtensionGroup> [0..*] <kml:color> ... </kml:color> [0..1] <kml:drawOrder> ... </kml:drawOrder> [0..1] <kml:Icon> ... </kml:Icon> [0..1] <kml:AbstractOverlaySimpleExtensionGroup> ... </kml:AbstractOverlaySimpleExtensionGroup> [0..*] <kml:AbstractOverlayObjectExtensionGroup> ... </kml:AbstractOverlayObjectExtensionGroup> [0..*] <kml:rotation> ... </kml:rotation> [0..1] <kml:ViewVolume> ... </kml:ViewVolume> [0..1] <kml:ImagePyramid> ... </kml:ImagePyramid> [0..1] <kml:Point> ... </kml:Point> [0..1] <kml:shape> ... </kml:shape> [0..1] <kml:PhotoOverlaySimpleExtensionGroup> ... </kml:PhotoOverlaySimpleExtensionGroup> [0..*] <kml:PhotoOverlayObjectExtensionGroup> ... </kml:PhotoOverlayObjectExtensionGroup> [0..*] </kml:PhotoOverlay>

110

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

11.4.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractOverlayGroup

The kml:PhotoOverlay element is used to position a photograph relative to the camera viewpoint and also to define field-of-view parameters. The kml:PhotoOverlay may be rendered on one of three shapes (as determined by the value of kml:shape): a 2D planar rectangle, a cylinder (for a panoramic photo), or a sphere (for a spherical panorama). The the photo overlay faces toward the viewpoint and its center is placed at the head of the view vector. The view vector is defined as the vector based at the viewpoint and in the direction specified by the corresponding kml:AbstractView element. The length of the view vector is determined by the value of the kml:near element. The photo overlay is positioned such that the view vector points toward the photo and is orthogonal to the center of the image (see Figure 9).

Figure 9: kml:PhotoOverlay View Vector The URL for the kml:PhotoOverlay image is specified in the kml:Icon tag, which is inherited from kml:AbstractOverlayGroup. The kml:Icon tag must contain a kml:href element that specifies the image resource to use for the kml:PhotoOverlay. A kml:PhotoOverlay element shall contain the kml:Icon, kml:ViewVolume, kml:Point, and kml:Camera child elements outside of an update context, that is when not a descendant of kml:Update.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

111

OGC 07-147r2

11.4.3

Handling large images

For large images an image pyramid (kml:ImagePyramid) may be used to specify a hierarchical set of images, each of which is an increasingly lower resolution version of the original image. Each image in the pyramid is subdivided into tiles, so that only the portions in view need to be loaded. An earth browser calculates the current viewpoint and load the tiles that are appropriate to the user's distance from the image. As the viewpoint moves closer to the kml:PhotoOverlay, the earth browser loads the higher resolution tiles. Since all the pixels in the original image can't be viewed on the screen at once, this preprocessing allows an earth browser to achieve maximum performance because it loads only the portions of the image that are in view, and only the pixel details that can be discerned by the user at the current viewpoint. When a kml:ImagePyramid is present, the kml:href specification in the kml:Icon element shall include parameterization to specify the level, x, and y values of the tiles to fetch, where: •

x = row position in the grid

y = column position in the grid

level = level in the image pyramid, with 0 being the highest level

For example, the URL for the image might be specified as follows: http://server.company.com/bigphoto/$[level]/row_$[x]_column_[$y].jpg

To request the tile in row 2, column 1, at level 3, Google Earth would fetch the following URL: http://server.company.com/bigphoto/3/row_2_column_1.jpg

By default, the origin (0,0) is at the lower left of the grid. If an image has an origin in the upper left, the kml:ImagePyramid shall specify topLeft for the kml:gridOrigin. The following figure illustrates numbering of tiles at level 2 of a 10-megapixel image:

112

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

See also 13.1 kml:Link, kml:Icon (kml:LinkType), 11.6.3 Creating an Image Pyramid. 11.4.4 11.4.4.1

Content kml:rotation

See 11.3.3.1 kml:rotation. 11.4.4.2

kml:ViewVolume

11.4.4.2.1

Description

Defines how much of the current scene is visible. See 11.5 kml:ViewVolume. 11.4.4.3

kml:ImagePyramid

11.4.4.3.1

Description

See 11.6 kml:ImagePyramid.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

113

OGC 07-147r2

11.4.4.4

kml:Point

11.4.4.4.1

Description

Specifies the location of an icon associated with the kml:PhotoOverlay. The kml:Point is styled using associated or default styles. See 10.3 kml:Point. 11.4.4.5

kml:shape

11.4.4.5.1

Description

The kml:PhotoOverlay is projected onto the kml:shape as shown in the case of a cylinder in Figure 10.

Figure 10: A Cylindrical kml:shape Positioned Relative to View Vector 11.4.4.5.2

Content

Type: Default Value: 11.4.4.6

kml:shapeEnumType rectangle

kml:PhotoOverlaySimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution.

114

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

11.4.4.7

kml:PhotoOverlayObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution. 11.4.5

Example

<PhotoOverlay> <!-- Feature elements --> <name>A simple non-pyramidal photo</name> <description>High above the ocean</description> <!-- AbstractOverlayGroup elements --> <Icon> <!-- A simple normal jpeg image --> <href>small-photo.jpg</href> </Icon> <!-- PhotoOverlay elements --> <!-- default: <shape> --> <ViewVolume> <near>1000</near> <leftFov>-60</leftFov> <rightFov>60</rightFov> <bottomFov>-45</bottomFov> <topFov>45</topFov> </ViewVolume> <Point> <coordinates>1,1</coordinates> </Point> <!-- if no ImagePyramid only level 0 is shown, fine for a non-pyramidal image --> </PhotoOverlay>

11.5 11.5.1

kml:ViewVolume Structure

<kml:ViewVolume id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:leftFov> ... </kml:leftFov> [0..1] <kml:rightFov> ... </kml:rightFov> [0..1] <kml:bottomFov> ... </kml:bottomFov> [0..1] <kml:topFov> ... </kml:topFov> [0..1] <kml:near> ... </kml:near> [0..1] <kml:ViewVolumeSimpleExtensionGroup> ... </kml:ViewVolumeSimpleExtensionGroup> [0..*] <kml:ViewVolumeObjectExtensionGroup> ... </kml:ViewVolumeObjectExtensionGroup> [0..*] </kml:ViewVolume>

11.5.2

Description

This element can be used wherever the following element is referenced:

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

115

OGC 07-147r2

kml:AbstractObjectGroup

Defines how much of the current scene in a kml:PhotoOverlay is visible. Specifying the field of view is analogous to specifying the lens opening in a physical camera. A small field of view, like a telephoto lens, focuses on a small part of the scene. A large field of view, like a wide-angle lens, focuses on a large part of the scene. A kml:ViewVolume element shall contain the kml:leftFov, kml:rightFov, kml:bottomFov, kml:topFov, and kml:near child elements outside of an update context, that is when not a descendant of kml:Update. 11.5.3

Content

11.5.3.1

kml:leftFov

11.5.3.1.1

Description

Angle, in decimal degrees, from the left side of the view volume to the camera's view vector. A negative value of the angle corresponds to a field of view that is ‘left’ of the view vector. 11.5.3.1.2

Content

Type: Default Value: 11.5.3.2

kml:rightFov

11.5.3.2.1

Description

kml:angle180Type 0.0

Angle, in decimal degrees, from the camera's view vector to the right side of the view volume. A positive value of the angle corresponds to a field of view that is ‘right’ of the view vector. 11.5.3.2.2

Content

Type: Default Value:

116

kml:angle180Type 0.0

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

11.5.3.3

kml:bottomFov

11.5.3.3.1

Description

Angle, in decimal degrees, from the the bottom side of the view volume to camera's view vector. 11.5.3.3.2

Content

Type: Default Value: 11.5.3.4

kml:topFov

11.5.3.4.1

Description

kml:angle90Type 0.0

Angle, in decimal degrees, from the camera's view vector to the top side of the view volume. 11.5.3.4.2

Content

Type: Default Value: 11.5.3.5

kml:near

11.5.3.5.1

Description

kml:angle90Type 0.0

Length in meters of the view vector, which starts from the camera viewpoint and ends at the kml:PhotoOverlay shape. The value shall be positive. 11.5.3.5.2

Content

Type: Default Value: 11.5.3.6

xsd:double 0.0

kml:ViewVolumeSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 11.5.3.7

kml:ViewVolumeObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

117

OGC 07-147r2

11.6

kml:ImagePyramid

11.6.1

Structure

<kml:ImagePyramid id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:tileSize> ... </kml:tileSize> [0..1] <kml:maxWidth> ... </kml:maxWidth> [0..1] <kml:maxHeight> ... </kml:maxHeight> [0..1] <kml:gridOrigin> ... </kml:gridOrigin> [0..1] <kml:ImagePyramidSimpleExtensionGroup> ... </kml:ImagePyramidSimpleExtensionGroup> [0..*] <kml:ImagePyramidObjectExtensionGroup> ... </kml:ImagePyramidObjectExtensionGroup> [0..*] </kml:ImagePyramid>

11.6.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractObjectGroup

Specifies a hierarchical set of images, each of which is an increasingly lower resolution (towards the top of the pyramid). Each image in the pyramid is subdivided into tiles so only the portions in view are loaded. The pixel size of the original image is specified in the kml:maxWidth and kml:maxHeight elements. The width and height can be any size and do not need to be a power of 2. You can fill out the remaining pixels with blank pixels, as described in. Tiles must be square, and the kml:tileSize must be a power of 2. A tile size of 256 (the default) or 512 is recommended. A kml:ImagePyramid element should have the kml:maxWidth and kml:maxHeight child elements present, and, if supplied, the kml:tileSize should be a power of 2. See also 11.4.3 Handling large images. 11.6.3

Creating an Image Pyramid

An image pyramid should be constructed as follows, assuming the image pixel measurement is a power of 2. 1. Starting with the original, full-size image, divide it into tile-sized pieces—for example, into blocks of 256 * 256 pixels each. 2. Shrink the image by a factor of 2. 118

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

3. Divide this new image into tile-sized squares. 4. Repeat steps 2 and 3 until the resulting image fits inside the tile size (for example, 256 * 256 pixels). If the image pixel measurement is not a power of 2, transparent fill pixels shall be added to make the tile square. Place the image so that the (0,0) tile is at the origin. For example, if the origin is at the lower left, the image should be located in the lower left of the tile grid. The row and columns that might need fill would then be at the right and top of the image. For best filtering, replicate the last row (or column) at the edge of the image. Then add fill (for example, black) to the remaining pixels in the tiles of the row (or column). For example, consider an image whose dimensions are 3600 * 2700 pixels (roughly 10 megapixels). An image pyramid for this image should be created as follows: 1. Using a tile size of 256 pixels, you can subdivide the original image into a grid of 16 * 16 pixels. (This image ends up as level 4 in the final pyramid.) 2. Fill in the pixels to "square up" the partially filled tiles in the last column (to the right) and the last row (at the top, assuming kml:gridOrigin is lowerLeft). 3. Scale down the image by a factor of 2. 4. Subdivide this image into 256-pixel tiles. The image at this level consists of a grid of 8 * 8 tiles (level 3). 5. Scale the level 3 image down by a factor of 2. 6. Subdivide into tiles. The image at this level consists of a grid of 4 * 4 tiles (level 2). 7. Scale the level 2 image down by a factor of 2. 8. Subdivide into tiles. The image at this level consists of a grid of 2 * 2 tiles (level 1). 9. Scale the level 1 image down by a factor of 2. 10. The resulting image is 256 * 256 pixels, so this is the last level of the image pyramid (level 0). The image pyramid for a 4096 * 4096 image has 5 levels, as shown in Table 3. Table 3: Example of Image Pyramid Levels Level

Number of Tiles

Size of Image (pixels)

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

119

OGC 07-147r2

0

1

256 * 256

1

4 (2 * 2 grid)

512 * 512

2

16 (4 * 4 grid)

1024 * 1024

3

64 (8 * 8 grid)

2048 * 2048

4

256 (16 * 16 grid)

4096 * 4096

Level n thus has 2n tiles in each direction. 11.6.4

Transparency

If an image is fully opaque then the image should be encoded in JPEG format. If part of the image is opaque and part is transparent both PNG and JPEG tiles may be specified, with PNG used for tiles that have transparency values. If both formats are used omit the file extension from the kml:href specification of the image file and include the file extension in the filename for each tile. 11.6.5

Content

11.6.5.1

kml:tileSize

11.6.5.1.1

Description

Size of the tiles, in pixels. Tiles must be square, and kml:tileSize must be a power of 2. A tile size of 256 (the default) or 512 is recommended. The original image is divided into tiles of this size, at varying resolutions. 11.6.5.1.2

Content

Type: Default Value:

xsd:int 256

11.6.5.2

kml:maxWidth

11.6.5.2.1

Description

Width in pixels of the original image.

120

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

11.6.5.2.2

Content

Type: Default Value: 11.6.5.3

kml:maxHeight

11.6.5.3.1

Description

xsd:int 0

Height in pixels of the original image. 11.6.5.3.2

Content

Type: Default Value: 11.6.5.4

kml:gridOrigin

11.6.5.4.1

Description

xsd:int 0

Specifies where to begin numbering the tiles in each layer of the pyramid. A value of lowerLeft specifies that row 1, column 1 of each layer is in the bottom left corner of the grid. 11.6.5.4.2

Content

Type: Default Value: 11.6.5.5

kml:gridOriginEnumType lowerLeft

kml:ImagePyramidSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 11.6.5.6

kml:ImagePyramidObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

121

OGC 07-147r2

11.7

kml:ScreenOverlay

11.7.1

Structure

<kml:ScreenOverlay id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:name> ... </kml:name> [0..1] <kml:visibility> ... </kml:visibility> [0..1] <kml:open> ... </kml:open> [0..1] <atom:author> ... </atom:author> [0..1] <atom:link> ... </atom:link> [0..1] <kml:address> ... </kml:address> [0..1] <xal:AddressDetails> ... </xal:AddressDetails> [0..1] <kml:phoneNumber> ... </kml:phoneNumber> [0..1] <kml:snippet> ... </kml:snippet> [0..1] <kml:description> ... </kml:description> [0..1] <kml:AbstractViewGroup> ... </kml:AbstractViewGroup> [0..1] <kml:AbstractTimePrimitiveGroup> ... </kml:AbstractTimePrimitiveGroup> [0..1] <kml:styleUrl> ... </kml:styleUrl> [0..1] <kml:AbstractStyleSelectorGroup> ... </kml:AbstractStyleSelectorGroup> [0..*] <kml:Region> ... </kml:Region> [0..1] <kml:ExtendedData> ... </kml:ExtendedData> [0..1] <kml:AbstractFeatureSimpleExtensionGroup> ... </kml:AbstractFeatureSimpleExtensionGroup> [0..*] <kml:AbstractFeatureObjectExtensionGroup> ... </kml:AbstractFeatureObjectExtensionGroup> [0..*] <kml:color> ... </kml:color> [0..1] <kml:drawOrder> ... </kml:drawOrder> [0..1] <kml:Icon> ... </kml:Icon> [0..1] <kml:AbstractOverlaySimpleExtensionGroup> ... </kml:AbstractOverlaySimpleExtensionGroup> [0..*] <kml:AbstractOverlayObjectExtensionGroup> ... </kml:AbstractOverlayObjectExtensionGroup> [0..*] <kml:overlayXY> kml:vec2Type </kml:overlayXY> [0..1] <kml:screenXY> kml:vec2Type </kml:screenXY> [0..1] <kml:rotationXY> kml:vec2Type </kml:rotationXY> [0..1] <kml:size> kml:vec2Type </kml:size> [0..1] <kml:rotation> ... </kml:rotation> [0..1] <kml:ScreenOverlaySimpleExtensionGroup> ... </kml:ScreenOverlaySimpleExtensionGroup> [0..*] <kml:ScreenOverlayObjectExtensionGroup> ... </kml:ScreenOverlayObjectExtensionGroup> [0..*] </kml:ScreenOverlay>

11.7.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractOverlayGroup

Specifies an image overlay to be displayed fixed to the screen. The image position is determined by mapping a point relative to the image (specified by kml:overlayXY) to a point relative to the screen (specified by kml:screenXY). The image may be rotated by

122

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

kml:rotation degrees about a point relative to the screen (specified by kml:rotationXY). The image sizing is determined using the kml:size element.

A kml:ScreenOverlay element should contain the kml:screenXY element outside of an update context, that is when not a descendant of kml:Update. 11.7.3

Content

11.7.3.1

kml:overlayXY

11.7.3.1.1

Description

Specifies a point on (or outside of) the image that is mapped to the screen coordinate (kml:screenXY). It requires x and y values, and the units for those values. The origin of the coordinate system is the lower left corner of the icon. 11.7.3.1.2

Content

Type: Default Value: 11.7.3.2

kml:screenXY

11.7.3.2.1

Description

kml:vec2Type See kml:vec2Type

Specifies a point relative to the screen origin that the image is mapped to. It requires x and y values, and the units for those values. The origin of the coordinate system is the lower left corner of the screen. 11.7.3.2.2

Content

Type: Default Value: 11.7.3.2.3

Example

11.7.3.3

kml:rotationXY

11.7.3.3.1

Description

kml:vec2Type See kml:vec2Type

Point relative to the screen about which the screen overlay is rotated. The origin of the coordinate system is in the lower left corner of the screen.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

123

OGC 07-147r2

11.7.3.3.2

Content

Type: Default Value: 11.7.3.4

kml:size

11.7.3.4.1

Description

kml:vec2Type See kml:vec2Type

Specifies the size of the image for a kml:ScreenOverlay. A value of −1 indicates to use the native dimension; a value of 0 indicates to maintain the aspect ratio; a value of n sets the value of the dimension. 11.7.3.4.2

Content

Type: Default Value: 11.7.3.4.3

kml:vec2Type See kml:vec2Type

Example

To force the image to retain its original x and y dimensions, set the values to −1: <size x="-1" y="-1" xunits="fraction" yunits="fraction"/>

To force the image to retain its horizontal dimension, but to take up 20 percent of the vertical screen space: <size x="-1" y="0.2" xunits="fraction" yunits="fraction"/>

To force the image to resize to 100px by 500px: <size x="100" y="500" xunits="pixels" yunits="pixels"/>

11.7.3.5

kml:rotation

11.7.3.5.1

Description

Indicates the angle of rotation, in decimal degrees, of the parent object. A value of 0 means no rotation. The value is an angle in decimal degrees counterclockwise starting from north. Use ±180 to indicate the rotation of the parent object from 0. The center of the kml:rotation, if not (.5,.5), is specified in kml:rotationXY. 11.7.3.5.2

Content

Type:

124

kml:angle180Type

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

Default Value: 11.7.3.5.3

11.7.4

0.0

Example

Examples

To center an image on the screen: <ScreenOverlay> <overlayXY x="0.5" y="0.5" xunits="fraction" yunits="fraction"/> <screenXY x="0.5" y="0.5" xunits="fraction" yunits="fraction"/> </ScreenOverlay>

To place an image on the top left of the screen: <ScreenOverlay> <overlayXY x="0" y="1" xunits="fraction" yunits="fraction"/> <screenXY x="0" y="1" xunits="fraction" yunits="fraction"/> </ScreenOverlay>

To place an image at the right of the screen: <ScreenOverlay> <overlayXY x="1" y="1" xunits="fraction" yunits="fraction"/> <screenXY x="1" y="1" xunits="fraction" yunits="fraction"/> </ScreenOverlay>

The following example places an image at the exact center of the screen, using the original width, height, and aspect ratio of the image.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

125

OGC 07-147r2

<ScreenOverlay id="khScreenOverlay756"> <name>Simple crosshairs</name> <description>This screen overlay uses fractional positioning to put the image in the exact center of the screen</description> <Icon> <href>http://myserver/myimage.jpg</href> </Icon> <overlayXY x="0.5" y="0.5" xunits="fraction" yunits="fraction"/> <screenXY x="0.5" y="0.5" xunits="fraction" yunits="fraction"/> <rotation>39.37878630116985</rotation> <size x="0" y="0" xunits="pixels" yunits="pixels"/> </ScreenOverlay>

126

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

12 Styles

12.1

kml:AbstractStyleSelectorGroup

12.1.1

Structure

<kml:AbstractStyleSelectorGroup id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractStyleSelectorSimpleExtensionGroup> ... </kml:AbstractStyleSelectorSimpleExtensionGroup> [0..*] <kml:AbstractStyleSelectorObjectExtensionGroup> ... </kml:AbstractStyleSelectorObjectExtensionGroup> [0..*] </kml:AbstractStyleSelectorGroup>

12.1.2

Description Abstract:

yes

This element can be used wherever the following element is referenced: •

kml:AbstractObjectGroup

The following elements can be used wherever this element is referenced: •

12.1.3 12.1.3.1

kml:Style

kml:StyleMap

Content kml:AbstractStyleSelectorSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 12.1.3.2

kml:AbstractStyleSelectorObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

127

OGC 07-147r2

12.2

kml:Style

12.2.1

Structure

<kml:Style id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractStyleSelectorSimpleExtensionGroup> ... </kml:AbstractStyleSelectorSimpleExtensionGroup> [0..*] <kml:AbstractStyleSelectorObjectExtensionGroup> ... </kml:AbstractStyleSelectorObjectExtensionGroup> [0..*] <kml:IconStyle> ... </kml:IconStyle> [0..1] <kml:LabelStyle> ... </kml:LabelStyle> [0..1] <kml:LineStyle> ... </kml:LineStyle> [0..1] <kml:PolyStyle> ... </kml:PolyStyle> [0..1] <kml:BalloonStyle> ... </kml:BalloonStyle> [0..1] <kml:ListStyle> ... </kml:ListStyle> [0..1] <kml:StyleSimpleExtensionGroup> ... </kml:StyleSimpleExtensionGroup> [0..*] <kml:StyleObjectExtensionGroup> ... </kml:StyleObjectExtensionGroup> [0..*] </kml:Style>

12.2.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractStyleSelectorGroup

Specifies a container of zero or more kml:AbstractColorStyleGroup elements that can referenced from a kml:StyleMap or kml:AbstractFeatureGroup. Styles affect how a kml:AbstractGeometryGroup is presented in the geographic view and how a kml:AbstractFeatureGroup appears in the list view. kml:Scale should contain at least one child element outside of an update context, that is when not a descendant of kml:Update. It is advised that kml:x, kml:y, and kml:z all be

specified. 12.2.3 12.2.3.1

Content kml:IconStyle

See 12.8 kml:IconStyle. 12.2.3.2

kml:LabelStyle

See 12.10 kml:LabelStyle.

128

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

12.2.3.3

kml:LineStyle

See 12.11 kml:LineStyle. 12.2.3.4

kml:PolyStyle

See 12.12 kml:PolyStyle. 12.2.3.5

kml:BalloonStyle

See 12.6 kml:BalloonStyle. 12.2.3.6

kml:ListStyle

See 12.13 kml:ListStyle. 12.2.3.7

kml:StyleSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 12.2.3.8

kml:StyleObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

129

OGC 07-147r2

12.2.4

Example

<Document> <!-- Begin Style Definitions --> <Style id="myDefaultStyles"> <IconStyle> <color>a1ff00ff</color> <scale>1.399999976158142</scale> <Icon> <href>http://myserver.com/icon.jpg</href> </Icon> </IconStyle> <LabelStyle> <color>7fffaaff</color> <scale>1.5</scale> </LabelStyle> <LineStyle> <color>ff0000ff</color> <width>15</width> </LineStyle> <PolyStyle> <color>7f7faaaa</color> <colorMode>random</colorMode> </PolyStyle> </Style> <!-- End Style Definitions --> <!-- Placemark #1 --> <Placemark> <name>Google Earth - New Polygon</name> <description>Here is some descriptive text</description> <styleUrl>#myDefaultStyles</styleUrl> . . . </Placemark> <!-- Placemark #2 --> <Placemark> <name>Google Earth - New Path</name> <styleUrl>#myDefaultStyles</styleUrl> . . . . </Placemark> </Document> </kml>

12.3

kml:StyleMap

12.3.1

Structure

<kml:StyleMap id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractStyleSelectorSimpleExtensionGroup> ... </kml:AbstractStyleSelectorSimpleExtensionGroup> [0..*] <kml:AbstractStyleSelectorObjectExtensionGroup> ... </kml:AbstractStyleSelectorObjectExtensionGroup> [0..*] <kml:Pair> ... </kml:Pair> [0..*] <kml:StyleMapSimpleExtensionGroup> ... </kml:StyleMapSimpleExtensionGroup> [0..*]

130

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<kml:StyleMapObjectExtensionGroup> ... </kml:StyleMapObjectExtensionGroup> [0..*] </kml:StyleMap>

12.3.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractStyleSelectorGroup

Specifies a mapping between two kml:Styles using a key/value pair that maps a mode to the predefined kml:styleUrl. A kml:StyleMap may be used to provide separate normal and highlighted styles for a kml:Placemark. kml:StyleMap should have two kml:Pair elements, one with a kml:key value of normal

and the other with a value of highlight, outside of an update context, that is when not a descendant of kml:Update. 12.3.3 12.3.3.1

Content kml:Pair

See 12.4 kml:Pair. 12.3.3.2

kml:StyleMapSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 12.3.3.3

kml:StyleMapObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

131

OGC 07-147r2

12.3.4

Example

<kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <name>StyleMap.kml</name> <open>1</open> <Style id="normalState"> <IconStyle> <scale>1.0</scale> <Icon> <href>http://maps.google.com/mapfiles/kml/pal3/icon55.png</href> </Icon> </IconStyle> <LabelStyle> <scale>1.0</scale> </LabelStyle> </Style> <Style id="highlightState"> <IconStyle> <Icon> <href>http://maps.google.com/mapfiles/kml/pal3/icon60.png</href> </Icon> <scale>1.1</scale> </IconStyle> <LabelStyle> <scale>1.1</scale> <color>ff0000c0</color> </LabelStyle> </Style> <StyleMap id="styleMapExample"> <Pair> <key>normal</key> <styleUrl>#normalState</styleUrl> </Pair> <Pair> <key>highlight</key> <styleUrl>#highlightState</styleUrl> </Pair> </StyleMap> <Placemark> <name>StyleMap example</name> <styleUrl>#styleMapExample</styleUrl> <Point> <coordinates>-122.368987,37.817634,0</coordinates> </Point> </Placemark> </Document> </kml>

12.4 12.4.1

kml:Pair Structure

<kml:Pair id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*]

132

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<kml:key> ... </kml:key> [0..1] <kml:styleUrl> ... </kml:styleUrl> [0..1] <kml:AbstractStyleSelectorGroup> ... </kml:AbstractStyleSelectorGroup> [0..1] <kml:PairSimpleExtensionGroup> ... </kml:PairSimpleExtensionGroup> [0..*] <kml:PairObjectExtensionGroup> ... </kml:PairObjectExtensionGroup> [0..*] </kml:Pair>

12.4.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractObjectGroup

Defines a key/value pair that maps a mode (normal or highlight) to the predefined kml:styleUrl and/or a kml:AbstractStyleSelectorGroup. If both kml:styleUrl and kml:AbstractStyleSelectorGroup exist then their styles shall be merged. A kml:Pair element shall contain kml:key and either kml:styleUrl or kml:AbstractStyleSelectorGroup child elements outside of an update context, that is when not a descendant of kml:Update. 12.4.3

Content

12.4.3.1

kml:key

12.4.3.1.1

Description

Identifies a key whose value is either normal or highlighted. 12.4.3.1.2

Content

Type: Default Value: 12.4.3.2

kml:styleStateEnumType normal

kml:styleURL

See 9.1.3.13 kml:styleURL. 12.4.3.3

kml:AbstractStyleSelectorGroup

See 12.1 kml:AbstractStyleSelectorGroup, 12.2 kml:Style12.3, and kml:StyleMap. 12.4.3.4

kml:PairSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

133

OGC 07-147r2

12.4.3.5

kml:PairObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution. 12.4.4

Example

<Pair> <key>normal</key> <styleUrl>http://myserver.com/population.xml#example_style_off</styleUrl> </Pair>

12.5

kml:AbstractSubStyleGroup

12.5.1

Structure

<kml:AbstractSubStyleGroup id="ID [0..1]" targetId="NCName [0..1]"> <kml:AbstractObjectGroupSimpleExtensionGroup> ... </kml:AbstractObjectGroupSimpleExtensionGroup> [0..*] <kml:AbstractSubStyleSimpleExtensionGroup> ... </kml:AbstractSubStyleSimpleExtensionGroup> [0..*] <kml:AbstractSubStyleObjectExtensionGroup> ... </kml:AbstractSubStyleObjectExtensionGroup> [0..*] </kml:AbstractSubStyleGroup>

12.5.2

Description Abstract:

yes

This element can be used wherever the following element is referenced: •

kml:AbstractObjectGroup

The following elements can be used wherever this element is referenced: •

kml:AbstractColorStyleGroup

kml:LabelStyle

kml:BalloonStyle

kml:LineStyle

kml:IconStyle

kml:PolyStyle

kml:ListStyle

12.5.3 12.5.3.1

Content kml:AbstractSubStyleSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution.

134

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

12.5.3.2

kml:AbstractSubStyleObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

12.6

kml:BalloonStyle

12.6.1

Structure

<kml:BalloonStyle id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractSubStyleSimpleExtensionGroup> ... </kml:AbstractSubStyleSimpleExtensionGroup> [0..*] <kml:AbstractSubStyleObjectExtensionGroup> ... </kml:AbstractSubStyleObjectExtensionGroup> [0..*] <kml:bgColor> ... </kml:bgColor> [0..1] <kml:textColor> ... </kml:textColor> [0..1] <kml:text> ... </kml:text> [0..1] <kml:displayMode> ... </kml:displayMode> [0..1] <kml:BalloonStyleSimpleExtensionGroup> ... </kml:BalloonStyleSimpleExtensionGroup> [0..*] <kml:BalloonStyleObjectExtensionGroup> ... </kml:BalloonStyleObjectExtensionGroup> [0..*] </kml:BalloonStyle>

12.6.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractSubStyleGroup

Specifies how the description balloon for a kml:AbstractFeatureGroup is drawn. kml:BalloonStyle should contain at least one child element outside of an update context, that is when not a descendant of kml:Update.

12.6.3

Content

12.6.3.1

kml:bgColor

12.6.3.1.1

Description

Specifies the background color of the graphic element.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

135

OGC 07-147r2

12.6.3.1.2

Content

Type: Default Value:

kml:colorType ffffffff

12.6.3.2

kml:textColor

12.6.3.2.1

Description

Specifies the foreground color of the text. 12.6.3.2.2

Content

Type: Default Value: 12.6.3.3

kml:text

12.6.3.3.1

Description

kml:colorType ffffffff

Specifies the text displayed in the balloon. The text may include HTML content that is encoded as well-formed XML using HTML entity references or by enclosing the HTML within a CDATA section. kml:text shall support entity substitution as defined in 6.5 Entity Replacement.

12.6.3.3.2

Content

Type: Default Value:

xsd:string none

12.6.3.4

kml:displayMode

12.6.3.4.1

Description

Controls whether the balloon is displayed or hidden. If kml:displayMode is default, the balloon shall be displayed. If kml:displayMode is hide, the balloon shall not be displayed. 12.6.3.4.2

Content

Type: Default Value:

136

kml:displayModeEnumType default

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

12.6.3.5

kml:BalloonStyleSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 12.6.3.6

kml:BalloonStyleObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

137

OGC 07-147r2

12.6.4

Example

<kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <name>BalloonStyle.kml</name> <open>1</open> <Style id="exampleBalloonStyle"> <BalloonStyle> <!-- a background color for the balloon --> <bgColor>ffffffbb</bgColor> <!-- styling of the balloon text --> <text><![CDATA[ <b><font color="#CC0000" size="+3">$[name]</font></b> <br/><br/> <font face="Courier">$[description]</font> <br/><br/> Extra text that will appear in the description balloon <br/><br/> <!-- insert the to/from hyperlinks --> $[geDirections] ]]></text> </BalloonStyle> </Style> <Placemark> <name>BalloonStyle</name> <description>An example of BalloonStyle</description> <styleUrl>#exampleBalloonStyle</styleUrl> <Point> <coordinates>-122.370533,37.823842,0</coordinates> </Point> </Placemark> </Document> </kml>

12.7 12.7.1

kml:AbstractColorStyleGroup Structure

<kml:AbstractColorStyleGroup id="ID [0..1]" targetId="NCName [0..1]"> <kml:AbstractObjectGroupSimpleExtensionGroup> ... </kml:AbstractObjectGroupSimpleExtensionGroup> [0..*] <kml:AbstractSubStyleSimpleExtensionGroup> ... </kml:AbstractSubStyleSimpleExtensionGroup> [0..*] <kml:AbstractSubStyleObjectExtensionGroup> ... </kml:AbstractSubStyleObjectExtensionGroup> [0..*] <kml:color> ... </kml:color> [0..1] <kml:colorMode> ... </kml:colorMode> [0..1] <kml:AbstractColorStyleSimpleExtensionGroup> ... </kml:AbstractColorStyleSimpleExtensionGroup> [0..*] <kml:AbstractColorStyleObjectExtensionGroup> ... </kml:AbstractColorStyleObjectExtensionGroup> [0..*] </kml:AbstractColorStyleGroup>

138

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

12.7.2

Description Abstract:

yes

This element can be used wherever the following element is referenced: •

kml:AbstractSubStyleGroup

The following elements can be used wherever this element is referenced: •

kml:IconStyle

kml:LabelStyle

kml:LineStyle

kml:PolyStyle

Provides elements for specifying the color and color mode of style types that derive from it. 12.7.3

Content

12.7.3.1

kml:color

12.7.3.1.1

Description

Specifies the color of the graphic element. 12.7.3.1.2

Content

Type: Default Value: 12.7.3.2

kml:colorMode

12.7.3.2.1

Description

kml:colorType ffffffff

Specifies the color mode of the graphic element. 12.7.3.2.2

Content

Type: Default Value: 12.7.3.3

kml:colorModeEnumType normal

kml:AbstractColorStyleSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

139

OGC 07-147r2

12.7.3.4

kml:AbstractColorStyleObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

12.8

kml:IconStyle

12.8.1

Structure

<kml:IconStyle id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractSubStyleSimpleExtensionGroup> ... </kml:AbstractSubStyleSimpleExtensionGroup> [0..*] <kml:AbstractSubStyleObjectExtensionGroup> ... </kml:AbstractSubStyleObjectExtensionGroup> [0..*] <kml:color> ... </kml:color> [0..1] <kml:colorMode> ... </kml:colorMode> [0..1] <kml:AbstractColorStyleSimpleExtensionGroup> ... </kml:AbstractColorStyleSimpleExtensionGroup> [0..*] <kml:AbstractColorStyleObjectExtensionGroup> ... </kml:AbstractColorStyleObjectExtensionGroup> [0..*] <kml:scale> ... </kml:scale> [0..1] <kml:heading> ... </kml:heading> [0..1] <kml:Icon> kml:BasicLinkType </kml:Icon> [0..1] <kml:hotSpot> ... </kml:hotSpot> [0..1] <kml:IconStyleSimpleExtensionGroup> ... </kml:IconStyleSimpleExtensionGroup> [0..*] <kml:IconStyleObjectExtensionGroup> ... </kml:IconStyleObjectExtensionGroup> [0..*] </kml:IconStyle>

12.8.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractColorStyleGroup

Specifies how icons for kml:Placemarks and kml:PhotoOverlay with a kml:Point geometry are drawn in an earth browser's list and geographic views. The color specified in the kml:color element of kml:IconStyle is blended with the color of the icon. kml:IconStyle should contain at least one child element outside of an update context, that is when not a descendant of kml:Update.

140

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

12.8.3

Content

12.8.3.1

kml:scale

12.8.3.1.1

Description

Specifies a scale factor that shall be applied to the graphic element. 12.8.3.1.2

Content

Type: Default Value: 12.8.3.2

kml:heading

12.8.3.2.1

Description

xsd:double 1.0

Direction (North, South, East, West), in decimal degrees. Values range from 0 (North) to 360 degrees. 12.8.3.2.2

Content

Type: Default Value: 12.8.3.3

kml:angle360Type 0.0

kml:Icon

See 12.9 kml:Icon (kml:BasicLinkType). 12.8.3.4

kml:hotSpot

12.8.3.4.1

Description

Specifies the position of the reference point on the icon that is anchored to the kml:Point specified in the kml:Placemark. The origin of the image coordinate system is in the lower left corner of the icon. 12.8.3.4.2

Content

Type: Default Value:

kml:vec2Type See kml:vec2Type

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

141

OGC 07-147r2

12.8.3.5

kml:IconStyleSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 12.8.3.6

kml:IconStyleObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution. 12.8.4

Example

<kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <Style id="randomColorIcon"> <IconStyle> <color>ff00ff00</color> <colorMode>random</colorMode> <scale>1.1</scale> <Icon> <href>http://maps.google.com/mapfiles/kml/pal3/icon21.png</href> </Icon> </IconStyle> </Style> <Placemark> <name>IconStyle.kml</name> <styleUrl>#randomColorIcon</styleUrl> <Point> <coordinates>-122.36868,37.831145,0</coordinates> </Point> </Placemark> </Document> </kml>

12.9 12.9.1

kml:Icon (kml:BasicLinkType) Structure

<kml:Icon id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:href> ... </kml:href> [0..1] <kml:BasicLinkSimpleExtensionGroup> ... </kml:BasicLinkSimpleExtensionGroup> [0..*] <kml:BasicLinkObjectExtensionGroup> ... </kml:BasicLinkObjectExtensionGroup> [0..*] </kml:Icon>

12.9.2

Description

This element can be used wherever the following element is referenced:

142

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

kml:AbstractObjectGroup

Specifies an icon resource location. kml:Icon should contain the kml:href child element outside of an update context, that is when not a descendant of kml:Update.

12.9.3

Content

12.9.3.1

kml:href

12.9.3.1.1

Description

Specifies the the resource location as a URL. The URL may contain a fragment component that allows indirect identification of some portion or subset of a resource. As defined in RFC 3986, a fragment identifier is indicated by the presence of a number sign ("#") character and terminated by the end of the URL. The format and semantics of a fragment identifier is dependent on the media type of the resource. The W3C XPointer framework specifies a standard syntax for referring to fragments of XML resources. An element within a KML resource may be referenced using a shorthand pointer that identifies at most one element; specifically, the kml:AbstractObjectGroup element (if any) that has a matching NCName as the value of the id attribute. EXAMPLE:

http://www.example.org/path/kml-resource#placemark-1

12.9.3.1.2

Content

Type: Default Value: 12.9.3.2

xsd:string none

kml:BasicLinkSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 12.9.3.3

kml:BasicLinkObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

143

OGC 07-147r2

12.10 kml:LabelStyle 12.10.1 Structure <kml:LabelStyle id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractSubStyleSimpleExtensionGroup> ... </kml:AbstractSubStyleSimpleExtensionGroup> [0..*] <kml:AbstractSubStyleObjectExtensionGroup> ... </kml:AbstractSubStyleObjectExtensionGroup> [0..*] <kml:color> ... </kml:color> [0..1] <kml:colorMode> ... </kml:colorMode> [0..1] <kml:AbstractColorStyleSimpleExtensionGroup> ... </kml:AbstractColorStyleSimpleExtensionGroup> [0..*] <kml:AbstractColorStyleObjectExtensionGroup> ... </kml:AbstractColorStyleObjectExtensionGroup> [0..*] <kml:scale> ... </kml:scale> [0..1] <kml:LabelStyleSimpleExtensionGroup> ... </kml:LabelStyleSimpleExtensionGroup> [0..*] <kml:LabelStyleObjectExtensionGroup> ... </kml:LabelStyleObjectExtensionGroup> [0..*] </kml:LabelStyle>

12.10.2 Description This element can be used wherever the following element is referenced: •

kml:AbstractColorStyleGroup

Specifies how the name of a kml:AbstractFeatureGroup is drawn in the geographic view. A user-defined color, color mode, and scale for the value of the name can be specified. kml:LabelStyle should contain at least one child element outside of an update context, that is when not a descendant of kml:Update.

12.10.3 Content 12.10.3.1 kml:scale 12.10.3.1.1 Description

Specifies a scale factor to be applied to the label. 12.10.3.1.2 Content

Type: Default Value: 144

xsd: double 1.0

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

12.10.4 Example <kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <Style id="randomLabelColor"> <LabelStyle> <color>ff0000cc</color> <colorMode>random</colorMode> <scale>1.5</scale> </LabelStyle> </Style> <Placemark> <name>LabelStyle.kml</name> <styleUrl>#randomLabelColor</styleUrl> <Point> <coordinates>-122.367375,37.829192,0</coordinates> </Point> </Placemark> </Document> </kml>

12.11 kml:LineStyle 12.11.1 Structure <kml:LineStyle id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractSubStyleSimpleExtensionGroup> ... </kml:AbstractSubStyleSimpleExtensionGroup> [0..*] <kml:AbstractSubStyleObjectExtensionGroup> ... </kml:AbstractSubStyleObjectExtensionGroup> [0..*] <kml:color> ... </kml:color> [0..1] <kml:colorMode> ... </kml:colorMode> [0..1] <kml:AbstractColorStyleSimpleExtensionGroup> ... </kml:AbstractColorStyleSimpleExtensionGroup> [0..*] <kml:AbstractColorStyleObjectExtensionGroup> ... </kml:AbstractColorStyleObjectExtensionGroup> [0..*] <kml:width> ... </kml:width> [0..1] <kml:LineStyleSimpleExtensionGroup> ... </kml:LineStyleSimpleExtensionGroup> [0..*] <kml:LineStyleObjectExtensionGroup> ... </kml:LineStyleObjectExtensionGroup> [0..*] </kml:LineStyle>

12.11.2 Description This element can be used wherever the following element is referenced: •

kml:AbstractColorStyleGroup

Specifies the drawing style (color, color mode, and line width) for all line geometry. Line geometry includes the kml:Polygon boundaries (kml:LinearRings) for which the

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

145

OGC 07-147r2

applicable kml:PolyStyle outline element value is 1 or true, and lines connecting extruded kml:Placemarks with a kml:Point geometry to the ground. Use kml:LineStyle to specify the color, color mode, and width of the line. For extruded kml:LineStrings, the line itself uses the current kml:LineStyle, and the extrusion uses the current kml:PolyStyle. 12.11.3 Content 12.11.3.1 kml:width 12.11.3.1.1 Description

Width of the line, in pixels. 12.11.3.1.2 Content

Type: Default Value:

xsd:double 1.0

12.11.3.2 kml:LineStyleSimpleExtensionGroup See 6.6.3.1 Simple Element Substitution. 12.11.3.3 kml:LineStyleObjectExtensionGroup See 6.6.3.2 Complex Element Substitution.

146

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

12.11.4 Example <kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <name>LineStyle.kml</name> <open>1</open> <Style id="linestyleExample"> <LineStyle> <color>7f0000ff</color> <width>4</width> </LineStyle> </Style> <Placemark> <name>LineStyle Example</name> <styleUrl>#linestyleExample</styleUrl> <LineString> <extrude>1</extrude> <tessellate>1</tessellate> <coordinates> -122.364383,37.824664,0 -122.364152,37.824322,0 </coordinates> </LineString> </Placemark> </Document> </kml>

12.12 kml:PolyStyle 12.12.1 Structure <kml:PolyStyle id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractSubStyleSimpleExtensionGroup> ... </kml:AbstractSubStyleSimpleExtensionGroup> [0..*] <kml:AbstractSubStyleObjectExtensionGroup> ... </kml:AbstractSubStyleObjectExtensionGroup> [0..*] <kml:color> ... </kml:color> [0..1] <kml:colorMode> ... </kml:colorMode> [0..1] <kml:AbstractColorStyleSimpleExtensionGroup> ... </kml:AbstractColorStyleSimpleExtensionGroup> [0..*] <kml:AbstractColorStyleObjectExtensionGroup> ... </kml:AbstractColorStyleObjectExtensionGroup> [0..*] <kml:fill> ... </kml:fill> [0..1] <kml:outline> ... </kml:outline> [0..1] <kml:PolyStyleSimpleExtensionGroup> ... </kml:PolyStyleSimpleExtensionGroup> [0..*] <kml:PolyStyleObjectExtensionGroup> ... </kml:PolyStyleObjectExtensionGroup> [0..*] </kml:PolyStyle>

12.12.2 Description This element can be used wherever the following element is referenced:

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

147

OGC 07-147r2

kml:AbstractColorStyleGroup

Specifies the drawing style for a kml:Polygon, including a kml:Polygon and the extruded portion of a kml:Polygon or kml:LineString. kml:PolyStyle should contain at least one child element outside of an update context, that is when not a descendant of kml:Update.

12.12.3 Content 12.12.3.1 kml:fill 12.12.3.1.1 Description

Specifies whether to fill the polygon. 1 or true specifies to fill the polygon; 0 or false specifies to not fill the polygon. 12.12.3.1.2 Content

Type: Default Value:

xsd:boolean 1 or true

12.12.3.2 kml:outline 12.12.3.2.1 Description

Specifies whether to outline the polygon. 1 or true specifies to draw the polygon boundaries; 0 or false specifies to not draw the polygon boundaries. NOTE:

Polygon outlines are styled using the current LineStyle.

12.12.3.2.2 Content

Type: Default Value:

xsd:boolean 1 or true

12.12.3.3 kml:PolyStyleSimpleExtensionGroup See 6.6.3.1 Simple Element Substitution. 12.12.3.4 kml:PolyStyleObjectExtensionGroup See 6.6.3.2 Complex Element Substitution.

148

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

12.12.4 Example <kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <name>PolygonStyle.kml</name> <open>1</open> <Style id="examplePolyStyle"> <PolyStyle> <color>ff0000cc</color> <colorMode>random</colorMode> </PolyStyle> </Style> <Placemark> <name>hollow box</name> <styleUrl>#examplePolyStyle</styleUrl> <Polygon> <extrude>1</extrude> <altitudeMode>relativeToGround</altitudeMode> <outerBoundaryIs> <LinearRing> <coordinates> -122.3662784465226,37.81884427772081,30 -122.3652480684771,37.81926777010555,30 -122.365640222455,37.81986126286519,30 -122.36666937925,37.81942987753481,30 -122.3662784465226,37.81884427772081,30 </coordinates> </LinearRing> </outerBoundaryIs> <innerBoundaryIs> <LinearRing> <coordinates> -122.366212593918,37.81897719083808,30 -122.3654241733188,37.81929450992014,30 -122.3657048517827,37.81973175302663,30 -122.3664882465854,37.81940249291773,30 -122.366212593918,37.81897719083808,30 </coordinates> </LinearRing> </innerBoundaryIs> </Polygon> </Placemark> </Document> </kml>

12.13 kml:ListStyle 12.13.1 Structure <kml:ListStyle id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractSubStyleSimpleExtensionGroup> ... </kml:AbstractSubStyleSimpleExtensionGroup> [0..*] <kml:AbstractSubStyleObjectExtensionGroup> ... </kml:AbstractSubStyleObjectExtensionGroup> [0..*]

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

149

OGC 07-147r2

<kml:listItemType> ... </kml:listItemType> [0..1] <kml:bgColor> ... </kml:bgColor> [0..1] <kml:ItemIcon> ... </kml:ItemIcon> [0..*] <kml:maxSnippetLines> ... </kml: maxSnippetLines> [0..1] <kml:ListStyleSimpleExtensionGroup> ... </kml:ListStyleSimpleExtensionGroup> [0..*] <kml:ListStyleObjectExtensionGroup> ... </kml:ListStyleObjectExtensionGroup> [0..*] </kml:ListStyle>

12.13.2 Description This element can be used wherever the following element is referenced: •

kml:AbstractColorStyleGroup

Specifies how a kml:AbstractFeatureGroup is displayed in the list view. kml:ListStyle should contain at least one child element outside of an update context, that is when not a descendant of kml:Update.

12.13.3 Content 12.13.3.1 kml:listItemType 12.13.3.1.1 Description

Specifies how a kml:Folder and its contents shall be displayed as items in the list view. 12.13.3.1.2 Content

Type: Default Value:

kml:listItemTypeEnumType check

12.13.3.2 kml:bgColor See 12.6.3.1 kml:bgColor. 12.13.3.3 kml:ItemIcon 12.13.3.3.1 Description

Icons used in the list view to reflects the state of a kml:Folder or kml:NetworkLink fetch. Multiple kml:ItemIcon elements may be encoded to associate each state with a unique icon.

150

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

See 12.14 kml:ItemIcon. 12.13.3.4 kml:maxSnippetLines 12.13.3.4.1 Description

Specifies the maximum number of lines to display for the kml:AbstractFeatureGroup kml:snippet value in the list view. 12.13.3.4.2 Content

Type: Default Value:

xsd:int 2

12.13.3.5 kml:ListStyleSimpleExtensionGroup See 6.6.3.1 Simple Element Substitution. 12.13.3.6 kml:ListStyleObjectExtensionGroup See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

151

OGC 07-147r2

12.13.4 Example <kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <name>ListStyle.kml</name> <open>1</open> <Style id="bgColorExample"> <ListStyle> <bgColor>ff336699</bgColor> </ListStyle> </Style> <Style id="checkHideChildrenExample"> <ListStyle> <listItemType>checkHideChildren</listItemType> </ListStyle> </Style> <Style id="radioFolderExample"> <ListStyle> <listItemType>radioFolder</listItemType> </ListStyle> </Style> <Folder> <name>ListStyle Examples</name> <open>1</open> <Folder> <name>bgColor example</name> <open>1</open>

<styleUrl>#bgColorExample</styleUrl> <Placemark> <name>pl1</name> <Point> <coordinates>-122.362815,37.822931,0</coordinates> </Point> </Placemark> <Placemark> <name>pl2</name> <Point> <coordinates>-122.362825,37.822931,0</coordinates> </Point> </Placemark> <Placemark> <name>pl3</name> <Point> <coordinates>-122.362835,37.822931,0</coordinates> </Point> </Placemark> </Folder> <Folder> <name>checkHideChildren example</name> <open>1</open> <styleUrl>#checkHideChildrenExample</styleUrl> <Placemark> <name>pl4</name> <Point> <coordinates>-122.362845,37.822941,0</coordinates> </Point> </Placemark> <Placemark> <name>pl5</name> <Point> <coordinates>-122.362855,37.822941,0</coordinates>

152

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

</Point> </Placemark> <Placemark> <name>pl6</name> <Point> <coordinates>-122.362865,37.822941,0</coordinates> </Point> </Placemark> </Folder> <Folder> <name>radioFolder example</name> <open>1</open> <styleUrl>#radioFolderExample</styleUrl> <Placemark> <name>pl7</name> <Point> <coordinates>-122.362875,37.822951,0</coordinates> </Point> </Placemark> <Placemark> <name>pl8</name> <Point> <coordinates>-122.362885,37.822951,0</coordinates> </Point> </Placemark> <Placemark> <name>pl9</name> <Point> <coordinates>-122.362895,37.822951,0</coordinates> </Point> </Placemark> </Folder> </Folder> </Document> </kml>

12.14 kml:ItemIcon 12.14.1 Structure <kml:ItemIcon id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:state> ... </kml:state> [0..1] <kml:href> ... </kml:href> [0..1] <kml:ItemIconSimpleExtensionGroup> ... </kml:ItemIconSimpleExtensionGroup> [0..*] <kml:ItemIconObjectExtensionGroup> ... </kml:ItemIconObjectExtensionGroup> [0..*] </kml:ItemIcon>

12.14.2 Description This element can be used wherever the following element is referenced:

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

153

OGC 07-147r2

kml:AbstractObjectGroup

Specifies the location (kml:href) for an icon used in the list view to reflect the state (kml:state) of the kml:Folder or kml:NetworkLink to which it is associated. kml:ItemIcon shall contain the kml:href element outside of an update context, that is when not a descendant of kml:Update.

12.14.3 Content 12.14.3.1 kml:state 12.14.3.1.1 Description

Specifies the current state of the kml:NetworkLink or kml:Folder. Icons associated with the open and closed modes are used for kml:Folders. Icons associated with the error and fetching0, fetching1, and fetching2 modes are used for kml:NetworkLinks. Sample icons for each state are shown in the following diagram.

12.14.3.1.2 Content

Type: Default Value:

kml:itemIconStateType none

12.14.3.2 kml:href See 12.9.3.1 kml:href.

154

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

12.14.3.3 kml:ItemIconSimpleExtensionGroup See 6.6.3.1 Simple Element Substitution. 12.14.3.4 kml:ItemIconObjectExtensionGroup See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

155

OGC 07-147r2

13 Links

13.1 13.1.1

kml:Link, kml:Icon (kml:LinkType) Structure

<kml:Link id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:href> ... </kml:href> [0..1] <kml:BasicLinkSimpleExtensionGroup> ... </kml:BasicLinkSimpleExtensionGroup> [0..*] <kml:BasicLinkObjectExtensionGroup> ... </kml:BasicLinkObjectExtensionGroup> [0..*] <kml:refreshMode> ... </kml:refreshMode> [0..1] <kml:refreshInterval> ... </kml:refreshInterval> [0..1] <kml:viewRefreshMode> ... </kml:viewRefreshMode> [0..1] <kml:viewRefreshTime> ... </kml:viewRefreshTime> [0..1] <kml:viewBoundScale> ... </kml:viewBoundScale> [0..1] <kml:viewFormat> ... </kml:viewFormat> [0..1] <kml:httpQuery> ... </kml:httpQuery> [0..1] <kml:LinkSimpleExtensionGroup> ... </kml:LinkSimpleExtensionGroup> [0..*] <kml:LinkObjectExtensionGroup> ... </kml:LinkObjectExtensionGroup> [0..*] </kml:Link>

<kml:Icon id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:href> ... </kml:href> [0..1] <kml:BasicLinkSimpleExtensionGroup> ... </kml:BasicLinkSimpleExtensionGroup> [0..*] <kml:BasicLinkObjectExtensionGroup> ... </kml:BasicLinkObjectExtensionGroup> [0..*] <kml:refreshMode> ... </kml:refreshMode> [0..1] <kml:refreshInterval> ... </kml:refreshInterval> [0..1] <kml:viewRefreshMode> ... </kml:viewRefreshMode> [0..1] <kml:viewRefreshTime> ... </kml:viewRefreshTime> [0..1] <kml:viewBoundScale> ... </kml:viewBoundScale> [0..1] <kml:viewFormat> ... </kml:viewFormat> [0..1] <kml:httpQuery> ... </kml:httpQuery> [0..1] <kml:LinkSimpleExtensionGroup> ... </kml:LinkSimpleExtensionGroup> [0..*] <kml:LinkObjectExtensionGroup> ... </kml:LinkObjectExtensionGroup> [0..*] </kml:Icon>

13.1.2

Description

This element can be used wherever the following element is referenced:

156

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

kml:AbstractObjectGroup

NOTE:

The schema type for kml:Link and kml:Icon derives by extension from kml:BasicLinkType, whose content model is described in 12.9 kml:Icon (kml:BasicLinkType).

kml:Link and kml:Icon have the same content model. They both specify the location (kml:href) and handling of a resource. For both elements kml:href shall be specified when not being used feature update context, that is when not a descendant of kml:Update.

The resource should be loaded and refreshed according to the refresh parameters supplied. Two different sets of refresh parameters can be specified: one based on time (kml:refreshMode and kml:refreshInterval) and one based on the current view (kml:viewRefreshMode and kml:viewRefreshTime). In addition, kml:Link and kml:Icon specifies whether to scale any bounding box parameters (kml:viewBoundScale), and provides a set of optional viewing parameters (kml:viewFormat) as well as a set of optional parameters containing version and language information (kml:httpQuery). The valid URL request shall be the concatenation of three pieces of information: •

the kml:href (URL) that specifies the resource location;

the kml:viewFormat string value used to specify any view parameters;

the kml:httpQuery string value used to specify any other query parameters.

An earth browser shall substitute relevant values for query parameters within the URL request. If kml:viewFormat or kml:httpQuery are specified, they should contain at least one parameter. If the resource specified in kml:href is a local resource, the kml:viewFormat and kml:httpQuery elements shall be ignored. kml:Link and kml:Icon shall contain the kml:href child element outside of an update context, that is when not a descendant of kml:Update.

13.1.3 13.1.3.1

Content kml:href

See 12.9.3.1 kml:href.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

157

OGC 07-147r2

13.1.3.2

kml:refreshMode

13.1.3.2.1

Description

Specifies a time-based refresh mode. If a fetched resource has a kml:NetworkLinkControl, the expires time takes precedence over expiration times specified in HTTP headers. If no expires time is specified, the HTTP max-age header is used (if present). If max-age is not present, the Expires HTTP header is used (if present). See RFC 2616. If kml:refreshInterval is specified then kml:refreshMode should be set to onInterval. If kml:viewRefreshTime is specified then kml:refreshMode should be set to onStop. 13.1.3.2.2

Content

Type: Default Value:

kml:refreshModeEnumType onChange

13.1.3.3

kml:refreshInterval

13.1.3.3.1

Description

Indicates to refresh the resource every n seconds. The value shall be positive. Content Type: Default Value:

xsd:double 4.0

13.1.3.4

kml:viewRefreshMode

13.1.3.4.1

Description

Specifies how the link is refreshed when the geographic view changes. 13.1.3.4.2

Content

Type: Default Value:

158

kml:viewRefreshModeEnumType never

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

13.1.3.5

kml:viewRefreshTime

13.1.3.5.1

Description

Specifies the number of seconds to wait before refreshing the geographic view after camera movement stops. This applies when kml:viewRefreshMode is set to onStop. The value shall be positive. 13.1.3.5.2

Content

Type: Default Value:

xsd:double 4.0

13.1.3.6

kml:viewBoundScale

13.1.3.6.1

Description

Scales any bounding box parameters. A value less than 1 specifies to use a geographic area less than the current geographic view. A value greater than 1 specifies to use a geographic area greater than the current geographic view. . The value shall be positive. 13.1.3.6.2

Content

Type: Default Value: 13.1.3.7

kml:viewFormat

13.1.3.7.1

Description

xsd:double 1.0

Specifies the format of a query string related to view parameters that is appended to the kml:href before the resource is fetched. The following query parameters may be used: •

[lookatLon], [lookatLat] – longitude and latitude of the point that kml:LookAt is viewing

[lookatRange], [lookatTilt], [lookatHeading] – values used by the kml:LookAt element (see descriptions of kml:range, kml:tilt, and kml:heading in kml:LookAt)

[lookatTerrainLon], [lookatTerrainLat], [lookatTerrainAlt] – point on the terrain in decimal degrees/meters that kml:LookAt is viewing

[cameraLon], [cameraLat], [cameraAlt] – decimal degrees/meters of the eyepoint for the camera

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

159

OGC 07-147r2

[horizFov], [vertFov] – horizontal, vertical field of view for the camera

[horizPixels], [vertPixels] – size in pixels of the geographic view

[terrainEnabled] – indicates whether the geographic view is showing terrain

[bboxWest], [bboxSouth], [bboxEast], [bboxNorth] – bounding box limits matching the OGC Web Map Service (WMS) bounding box specification.

13.1.3.7.2

Content

Type: Default Value:

xsd:string none

13.1.3.8

kml:httpQuery

13.1.3.8.1

Description

String value used to specify any additional query parameters not related to the geographic view. 13.1.3.8.2

Content

Type: Default Value:

xsd:string none

The following query parameters may be used: •

[clientVersion] – version of earth browser client

[kmlVersion] – version of requested kml

[clientName] – name of earth browser client

[language] – language preference of the earth browser client

13.1.3.9

kml:LinkSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 13.1.3.10 kml:LinkObjectExtensionGroup See 6.6.3.2 Complex Element Substitution.

160

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

13.1.4

Example

<NetworkLink> <name>NE US Radar</name> <flyToView>1</flyToView> <Link> <href>http://www.example.com/geotiff/NE/MergedReflectivityQComposite.kml</href> <refreshMode>onInterval</refreshMode> <refreshInterval>30</refreshInterval> <viewRefreshMode>onStop</viewRefreshMode> <viewRefreshTime>7</viewRefreshTime> <viewFormat>BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth];CAMERA=\ [lookatLon],[lookatLat],[lookatRange],[lookatTilt],[lookatHeading];VIEW=\ [horizFov],[vertFov],[horizPixels],[vertPixels],[terrainEnabled]</viewFormat> </Link> </NetworkLink>

13.2 13.2.1

kml:NetworkLinkControl Structure

<kml:NetworkLinkControl> <kml:minRefreshPeriod> ... </kml:minRefreshPeriod> [0..1] <kml:maxSessionLength> ... </kml:maxSessionLength> [0..1] <kml:cookie> ... </kml:cookie> [0..1] <kml:message> ... </kml:message> [0..1] <kml:linkName> ... </kml:linkName> [0..1] <kml:linkDescription> ... </kml:linkDescription> [0..1] <kml:linkSnippet> ... </kml:linkSnippet> [0..1] <kml:expires> ... </kml:expires> [0..1] <kml:Update> ... </kml:Update> [0..1] <kml:AbstractViewGroup> ... </kml:AbstractViewGroup> [0..1] <kml:NetworkLinkControlSimpleExtensionGroup> ... </kml:NetworkLinkControlSimpleExtensionGroup> [0..*] <kml:NetworkLinkControlObjectExtensionGroup> ... </kml:NetworkLinkControlObjectExtensionGroup> [0..*] </kml:NetworkLinkControl>

13.2.2

Description

Controls the behaviour of a kml:NetworkLink that references the KML resource to which the kml:NetworkLinkControl belongs. See also 9.12 kml:NetworkLink.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

161

OGC 07-147r2

13.2.3

Content

13.2.3.1

kml:minRefreshPeriod

13.2.3.1.1

Description

Specifies in seconds the minimum allowed time between refreshes of the referenced KML resource. The value shall take precedence over the kml:refreshInterval element value specified by the kml:NetworkLink. 13.2.3.1.2

Content

Type: Default Value:

xsd:double 0.0

13.2.3.2

kml:maxSessionLength

13.2.3.2.1

Description

Specifies in seconds the maximum time that an earth browser shall remain connected to the referenced KML resource. The default value of -1 indicates not to terminate the session explicitly. 13.2.3.2.2

Content

Type: Default Value: 13.2.3.3

kml:cookie

13.2.3.3.1

Description

xsd: double -1.0

Use this element to append a string to the kml:NetworkLink URL query. 13.2.3.3.2

Content

Type: Default Value:

162

xsd:string none

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

13.2.3.4

kml:message

13.2.3.4.1

Description

Text that should be displayed when a kml:NetworkLink is first activated or the kml:message value is updated. 13.2.3.4.2

Content

Type: Default Value: 13.2.3.5

kml:linkName

13.2.3.5.1

Description

xsd:string none

Specifies valid content for the kml:NetworkLink kml:name element. The kml:linkName value shall take precedence over the value of kml:name value. 13.2.3.5.2

Content

Type: Default Value:

xsd:string none

13.2.3.6

kml:linkDescription

13.2.3.6.1

Description

Specifies text for the kml:NetworkLink kml:description element. The kml:linkDescription value shall take precedence over the kml:NetworkLink kml:description value. The text may include HTML content that is encoded as well-formed XML using HTML entity references or by enclosing the HTML within a CDATA section. 13.2.3.6.2

Content

Type: Default Value:

xsd:string none

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

163

OGC 07-147r2

13.2.3.7

kml:linkSnippet

13.2.3.7.1

Description

Specifies text for the kml:NetworkLink kml:Snippet element. The kml:linkSnippet content shall take precedence over the kml:NetworkLink kml:Snippet value. The text may include HTML content that is encoded as well-formed XML using HTML entity references or by enclosing the HTML within a CDATA section. See also 9.1.3.9 kml:snippet. 13.2.3.7.2

Content

Type: Default Value: 13.2.3.8

kml:expires

13.2.3.8.1

Description

xsd:string none

Specifies a point in time at which the kml:NetworkLink shall be refreshed. It applies only if an associated kml:Link refreshMode value is onExpire. 13.2.3.8.2

Content

Type: Default Value: 13.2.3.9

kml:dateTimeType none

kml:Update

See 13.3 kml:Update. 13.2.3.10 kml:AbstractViewGroup See 14.1 AbstractViewGroup. 13.2.3.11 kml:NetworkLinkControlSimpleExtensionGroup See 6.6.3.1 Simple Element Substitution.

164

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

13.2.3.12 kml:NetworkLinkControlObjectExtensionGroup See 6.6.3.2 Complex Element Substitution. 13.2.4

Example

<kml xmlns="http://www.opengis.net/kml/2.2"> <NetworkLinkControl> <message>This is a pop-up message. You will only see this once</message> <cookie>cookie=sometext</cookie> <linkName>New KML features</linkName> <linkDescription><![CDATA[KML now has new features available!]]></linkDescription> </NetworkLinkControl> </kml>

13.3

kml:Update

13.3.1

Structure

<kml:Update> <kml:targetHref> anyURI </kml:targetHref> [1] Start Choice [1..*] <kml:Create> ... </kml:Create> [1] <kml:Delete> ... </kml:Delete> [1] <kml:Change> ... </kml:Change> [1] <kml:UpdateOpExtensionGroup> ... </kml:UpdateOpExtensionGroup> [1] End Choice <kml:UpdateExtensionGroup> ... </kml:UpdateExtensionGroup> [0..*] </kml:Update>

13.3.2

Description

Specifies an addition, change, or deletion to a KML resource that has previously been retrieved via kml:NetworkLink. NOTE:

Update does not affect the KML resource itself; rather it updates its representation within the earth browser only.

All KML objects within an update context, that is a grandchild of the kml:Update element shall include a targetId attribute that identifies the object to be updated, and shall not have an id attribute. kml:Update shall have at least one child element.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

165

OGC 07-147r2

13.3.3

Content

13.3.3.1

kml:targetHref

13.3.3.1.1

Description

Specifies the URL for the target KML resource that has been previously retrieved via kml:NetworkLink. 13.3.3.1.2

Content

Type: Default Value: 13.3.3.2

xsd:anyURI none

kml:Create

See 13.4 kml:Create. 13.3.3.3

kml:Delete

See 13.5 kml:Delete. 13.3.3.4

kml:Change

See 13.6 kml:Change. 13.3.3.5

kml:UpdateOpExtensionGroup

See 6.6.3.2 Complex Element Substitution. 13.3.3.6

kml:UpdateExtensionGroup

See 6.6.3.2 Complex Element Substitution.

166

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

13.4

kml:Create

13.4.1

Structure

<kml:Create> <kml:AbstractContainerGroup> ... </kml:AbstractContainerGroup> [0..*] </kml:Create>

13.4.2

Description

Specifies the addition of zero or more kml:AbstractFeatureGroup elements to an identified kml:Folder or kml:Document in the target resource. The kml:Folder or kml:Document shall be identified as a child of the kml:Create element and shall include the kml:targetId attribute, and omit the id attribute.New kml:AbstractFeatureGroup elements to be added to the identified kml:Folder or kml:Document are specified as the content of this child. The kml:targetHref for a created kml:AbstractFeatureGroup is the same as that of the target KML resource. 13.4.3 13.4.3.1

Content kml:AbstractContainerGroup

See 9.6 kml:AbstractContainerGroup. 13.4.4

Example

This example creates a new kml:Placemark in a previously created kml:Document that has an id of region24. Note that to make subsequent updates to placemark891, http://myserver.com/Point.kml is used as the kml:targetHref value.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

167

OGC 07-147r2

<Update> <targetHref>http://myserver.com/Point.kml</targetHref> <Create> <Document targetId="region24"> <Placemark id="placemark891"> <Point> <coordinates>-95.48,40.43,0</coordinates> </Point> </Placemark> </Document> </Create> </Update>

13.5

kml:Delete

13.5.1

Structure

<kml:Delete> <kml:AbstractFeatureGroup> ... </kml:AbstractFeatureGroup> [0..*] </kml:Delete>

13.5.2

Description

Specifies the deletion of zero or more kml:AbstractFeatureGroup elements in the target resource. Features shall be identified as children of the kml:Create element and shall include the kml:targetId attribute and omit the id attribute. 13.5.3 13.5.3.1

Content kml:AbstractFeatureGroup

See 9.1 kml:AbstractFeatureGroup. 13.5.4

Example

This example deletes a kml:Placemark previously loaded into an earth browser. This kml:Placemark may have been loaded directly by a kml:NetworkLink with the specified URL, or it may have been loaded by a subsequent kml:Update to the original kml:Document.

168

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<Update> <targetHref>http://www.foo.com/Point.kml</targetHref> <Delete> <Placemark targetId="pa3556"></> </Delete> </Update>

13.6

kml:Change

13.6.1

Structure

<kml:Change> <kml:AbstractObjectGroup> ... </kml:AbstractObjectGroup> [0..*] </kml:Change>

13.6.2

Description

Specifies modifications to zero or more identified kml:AbstractObjectGroup elements in the target resource. Target elements to be modified are identified as children of the kml:Change element and shall include the kml:targetId attribute and omit the id attribute. Modifications to the identified kml:AbstractObjectGroup are specified by the content of these children. The content of identified target elements not subject to modification shall remain unchanged. 13.6.3 13.6.3.1

Content kml:AbstractObjectGroup

See 8.1 kml:AbstractObjectGroup. 13.6.3.2

kml:NetworkLinkControlSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 13.6.3.3

kml:NetworkLinkControlObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

169

OGC 07-147r2

13.6.4

Example

<NetworkLinkControl> <Update> <targetHref>http://www/~sam/January14Data/Point.kml</targetHref> <Change> <Point targetId="point123"> <coordinates>-95.48,40.43,0</coordinates> </Point> </Change> </Update> </NetworkLinkControl>

170

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

14 Views

14.1

kml:AbstractViewGroup

14.1.1

Structure

<kml:AbstractViewGroup id="ID [0..1]" targetId="NCName [0..1]"> <kml:AbstractObjectGroupSimpleExtensionGroup> ... </kml:AbstractObjectGroupSimpleExtensionGroup> [0..*] <kml:AbstractViewSimpleExtensionGroup> ... </kml:AbstractViewSimpleExtensionGroup> [0..*] <kml:AbstractViewObjectExtensionGroup> ... </kml:AbstractViewObjectExtensionGroup> [0..*] </kml:AbstractViewGroup>

14.1.2

Description Abstract:

yes

This element can be used wherever the following element is referenced: •

kml:AbstractObjectGroup

The following elements can be used wherever this element is referenced: •

kml:LookAt

kml:Camera

An earth browser displays KML graphics overlaid on a backdrop image which is typically that of the earth. In addition to describing the overlaid graphic elements, KML can define a geographic view of the overlaid graphics and the backdrop image. 14.1.3 14.1.3.1

Content kml:AbstractViewSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 14.1.3.2

kml:AbstractViewObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

171

OGC 07-147r2

14.2

kml:Camera

14.2.1

Structure

<kml:Camera id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractViewSimpleExtensionGroup> ... </kml:AbstractViewSimpleExtensionGroup> [0..*] <kml:AbstractViewObjectExtensionGroup> ... </kml:AbstractViewObjectExtensionGroup> [0..*] <kml:longitude> ... </kml:longitude> [0..1] <kml:latitude> ... </kml:latitude> [0..1] <kml:altitude> ... </kml:altitude> [0..1] <kml:heading> ... </kml:heading> [0..1] <kml:tilt> ... </kml:tilt> [0..1] <kml:roll> ... </kml:roll> [0..1] <kml:altitudeModeGroup> ... </kml:altitudeModeGroup> [0..1] <kml:CameraSimpleExtensionGroup> ... </kml:CameraSimpleExtensionGroup> [0..*] <kml:CameraObjectExtensionGroup> ... </kml:CameraObjectExtensionGroup> [0..*] </kml:Camera>

14.2.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractViewGroup

The kml:Camera element specifies the position and orientation of a virtual camera. This can be used to specify views of the earth or of objects in space. A kml:Camera element should contain the kml:longitude, kml:latitude,and kml:altitude child elements outside of an update context, that is when not a descendant of kml:Update. 14.2.3

Defining a View

The kml:Camera element specifies the position of the view point of the camera using the child elements kml:longitude, kml:latitude, kml:altitude and kml:altitudeMode. The orientation of the camera is specified using the additional child elements kml:heading, kml:tilt and kml:roll. The initial or zero position of the camera is defined by an earth-fixed frame lying in a meridian plane (plane containing the view point, the poles, and the earth's center of mass), with the Z'-axis normal to the earth's surface, the Y'-axis directed away from the equator, and the X'-axis such as to form a right handed orthogonal frame. A body-fixed reference frame is assumed attached to the virtual camera, with the Z-axis along the optical axis of the camera, the Y-axis through the top of the camera, and the X-axis 172

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

such as to form a right handed orthogonal frame. In the zero position of the camera, the camera body Z-axis is aligned with the –Z' axis and the body Y axis with the Y' axis. The orientation of the camera is then defined by the following sequence of rotations (Euler angles) which must be performed in the stated order: •

kml:altitude – translate along the Z' axis to the specified altitude.

kml:heading – clockwise rotation around the Z axis. The range of the heading is

from 0 to 360 degrees. •

kml:tilt – counter clockwise rotation around the X axis. The range of the tilt is from

-180 to + 180 degrees. •

kml:roll – clockwise around the Z axis (again). The range of the roll is from -180 to

+180 degrees The camera body axes are shown as follows:

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

173

OGC 07-147r2

The earth-fixed frame specifying the initial (zero) orientation of the camera is illustrated below:

14.2.4

Order of Rotation

The order of rotation is important. By default, the camera shall look straight down the Z axis towards the Earth. The order of rotation is: 1. kml:heading – rotate around the Z axis. 5. kml:tilt – rotate around the X axis. 6. kml:roll – rotate around the Z axis (again). The camera's view direction is a vector that is computed from these three rotations. Note that each time a rotation is applied, two of the camera axes shall change their orientation.

174

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

Heading (Rotation about Z):

Tilt (Rotation about X):

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

175

OGC 07-147r2

Roll (Rotation about Z again)

14.2.5

Content

14.2.5.1

kml:longitude

14.2.5.1.1

Description

Geodetic longitude of the virtual camera (eye point). Angular distance in decimal degrees, relative to the Prime Meridian. Values west of the Meridian range from −180 to 0 degrees. Values east of the Meridian range from 0 to 180 degrees. 14.2.5.1.2

Content

Type: Default Value: 14.2.5.2

kml:latitude

14.2.5.2.1

Description

kml:angle180Type 0.0

Geodetic latitude of the virtual camera. Decimal degrees north or south of the Equator (0 degrees). Values range from −90 degrees to 90 degrees.

176

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

14.2.5.2.2

Content

Type: Default Value: 14.2.5.3

kml:altitude

14.2.5.3.1

Description

kml:angle90Type 0.0

Distance of the camera from the Earth's surface, in meters, interpreted according to the kml:altitudeMode specification. 14.2.5.3.2

Content

Type: Default Value: 14.2.5.4

kml:heading

14.2.5.4.1

Description

xsd:double 0.0

Direction (azimuth) of the camera, in decimal degrees. Values range from 0 (North) to 360 degrees. 14.2.5.4.2

Content

Type: Default Value: 14.2.5.5

kml:tilt

14.2.5.5.1

Description

kml:angle360Type 0.0

Rotation, in decimal degrees, of the camera around the X axis. A value of 0 indicates that the view is aimed straight down toward the earth (the most common case). A value of 90 for kml:tilt indicates that the view is aimed toward the horizon. Values greater than 90 indicate that the view is pointed up into the sky. Values for kml:tilt are clamped at +180 degrees. 14.2.5.5.2

Content

Type: Default Value:

kml:angle180Type 0.0

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

177

OGC 07-147r2

14.2.5.6

kml:roll

14.2.5.6.1

Description

Rotation, in decimal degrees, of the camera around the Z axis. Values range from −180 to +180 degrees. 14.2.5.6.2

Content

Type: Default Value: 14.2.5.7

kml:angle180Type 0.0

kml:altitudeModeGroup

See 9.16 kml:altitudeModeGroup and 9.17 kml:altitudeMode. 14.2.5.8

kml:CameraSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 14.2.5.9

kml:CameraObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

178

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

14.3

kml:LookAt

14.3.1

Structure

<kml:LookAt id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractViewSimpleExtensionGroup> ... </kml:AbstractViewSimpleExtensionGroup> [0..*] <kml:AbstractViewObjectExtensionGroup> ... </kml:AbstractViewObjectExtensionGroup> [0..*] <kml:longitude> ... </kml:longitude> [0..1] <kml:latitude> ... </kml:latitude> [0..1] <kml:altitude> ... </kml:altitude> [0..1] <kml:heading> ... </kml:heading> [0..1] <kml:tilt> ... </kml:tilt> [0..1] <kml:range> ... </kml:range> [0..1] <kml:altitudeModeGroup> ... </kml:altitudeModeGroup> [0..1] <kml:LookAtSimpleExtensionGroup> ... </kml:LookAtSimpleExtensionGroup> [0..*] <kml:LookAtObjectExtensionGroup> ... </kml:LookAtObjectExtensionGroup> [0..*] </kml:LookAt>

14.3.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractViewGroup

Specifies the geographic view in terms of a point of interest viewed from a virtual camera. The kml:LookAt object is more limited in scope than kml:Camera and should establish a view direction that intersects the Earth's surface. A kml:LookAt element shall contain the kml:longitude, kml:latitude,and kml:range child elements outside of an update context, that is when not a descendant of kml:Update.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

179

OGC 07-147r2

14.3.3

Defining How to Look

This diagram illustrates the kml:range, kml:tilt, and kml:altitude elements:

This diagram illustrates the kml:heading element:

180

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

14.3.4

Content

14.3.4.1

kml:longitude

14.3.4.1.1

Description

Geodetic longitude of the point the camera is looking at. Angular distance in decimal degrees, relative to the Prime Meridian. Values west of the Meridian range from −180 to 0 degrees. Values east of the Meridian range from 0 to 180 degrees. 14.3.4.1.2

Content

Type: Default Value: 14.3.4.2

kml:latitude

14.3.4.2.1

Description

kml:angle180Type 0.0

Geodetic latitude of the point the camera is looking at. Decimal degrees north or south of the Equator (0 degrees). Values range from −90 degrees to 90 degrees. 14.3.4.2.2

Content

Type: Default Value: 14.3.4.3

kml:altitude

14.3.4.3.1

Description

kml:angle90Type 0.0

Altitude in meters, interpreted according to the kml:altitudeMode specification. 14.3.4.3.2

Content

Type: Default Value:

xsd:double 0.0

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

181

OGC 07-147r2

14.3.4.4

kml:heading

14.3.4.4.1

Description

Direction (North, South, East, West), in decimal degrees. Values range from 0 (North) to 360 degrees. 14.3.4.4.2

Content

Type: Default Value: 14.3.4.5

kml:tilt

14.3.4.5.1

Description

kml:angle360Type 0.0

Angle, in decimal degrees, between the direction of the LookAt position and the normal to the surface of the Earth. Values range from 0 to 90 degrees. Values for kml:tilt cannot be negative. A kml:tilt value of 0 degrees indicates viewing from directly above. A kml:tilt value of 90 degrees indicates viewing along the horizon. 14.3.4.5.2

Content

See 16.5 kml:anglepos180Type. 14.3.4.6

kml:range

14.3.4.6.1

Description

Distance in meters from the point specified by kml:longitude, kml:latitude, and kml:altitude to the kml:LookAt position. 14.3.4.6.2

Content

Type: Default Value:

182

xsd:double 0.0

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

14.3.4.7

kml:altitudeModeGroup

14.3.4.7.1

Description

The default value clampToGround indicates to place the kml:LookAt position on the terrain. See 9.16 kml:altitudeModeGroup and 9.17 kml:altitudeMode. 14.3.4.8

kml:LookAtSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 14.3.4.9

kml:LookAtObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution. 14.3.5

Example

<kml xmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>LookAt.kml</name> <LookAt> <longitude>-122.363</longitude> <latitude>37.81</latitude> <altitude>2000</altitude> <range>500</range> <tilt>45</tilt> <heading>0</heading> <altitudeMode>relativeToGround</altitudeMode> </LookAt> <Point> <coordinates>-122.363,37.82,0</coordinates> </Point> </Placemark> </kml>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

183

OGC 07-147r2

15 Time

15.1

kml:AbstractTimePrimitiveGroup

15.1.1

Structure

<kml:AbstractTimePrimitiveGroup id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractTimePrimitiveSimpleExtensionGroup> ... </kml:AbstractTimePrimitiveSimpleExtensionGroup> [0..*] <kml:AbstractTimePrimitiveObjectExtensionGroup> ... </kml:AbstractTimePrimitiveObjectExtensionGroup> [0..*] </kml:AbstractTimePrimitiveGroup>

15.1.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractObjectGroup

The following elements can be used wherever this element is referenced: •

kml:TimeStamp

kml:TimeSpan

Time values encoded within elements that extend kml:AbstractTimePrimitiveGroup shall be in the context of the temporal reference system specified by ISO 8601, which uses the Gregorian Calendar and 24 hour local or Coordinated Universal Time (UTC). See also 9.6 kml:AbstractContainerGroup regarding the inheritance of the kml:AbstractTimePrimitiveGroup within KML feature hierarchies. 15.1.3 15.1.3.1

Content kml:AbstractTimePrimitiveSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 15.1.3.2

kml:AbstractTimePrimitiveObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

184

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

15.2

kml:TimeSpan

15.2.1

Structure

<kml:TimeSpan id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractTimePrimitiveSimpleExtensionGroup> ... </kml:AbstractTimePrimitiveSimpleExtensionGroup> [0..*] <kml:AbstractTimePrimitiveObjectExtensionGroup> ... </kml:AbstractTimePrimitiveObjectExtensionGroup> [0..*] <kml:begin> ... </kml:begin> [0..1] <kml:end> ... </kml:end> [0..1] <kml:TimeSpanSimpleExtensionGroup> ... </kml:TimeSpanSimpleExtensionGroup> [0..*] <kml:TimeSpanObjectExtensionGroup> ... </kml:TimeSpanObjectExtensionGroup> [0..*] </kml:TimeSpan>

15.2.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractTimePrimitiveGroup

Specifies an extent in time bounded by begin and end temporal values. At least one of the child elements kml:begin and kml:end shall be encoded. 15.2.3

Content

15.2.3.1

kml:begin

15.2.3.1.1

Description

Describes the beginning instant of a time period. If absent, the beginning of the period is unbounded. The value shall be encoding according to the kml:dateTimeType field type. 15.2.3.1.2

Content

Type: Default Value:

kml:dateTimeType none

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

185

OGC 07-147r2

15.2.3.2

kml:end

15.2.3.2.1

Description

Describes the ending instant of a time period. If absent, the end of the period is unbounded. The value shall be later than the kml:begin value. The value shall be encoding according to the kml:dateTimeType field type. 15.2.3.2.2

Content

Type: Default Value: 15.2.3.3

kml:dateTimeType none

kml:TimeSpanSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 15.2.3.4

kml:TimeSpanObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution. 15.2.4

Example

The following example shows the time period representing Colorado's statehood. It contains only a kml:begin element because Colorado became a state on August 1, 1876, and continues to be a state:

186

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<Placemark> <name>Colorado</name> ... <TimeSpan> <begin>1876-08-01</begin> </TimeSpan> </Placemark>

15.3

kml:TimeStamp

15.3.1

Structure

<kml:TimeStamp id="ID [0..1]" targetId="NCName [0..1]"> <kml:ObjectSimpleExtensionGroup> ... </kml:ObjectSimpleExtensionGroup> [0..*] <kml:AbstractTimePrimitiveSimpleExtensionGroup> ... </kml:AbstractTimePrimitiveSimpleExtensionGroup> [0..*] <kml:AbstractTimePrimitiveObjectExtensionGroup> ... </kml:AbstractTimePrimitiveObjectExtensionGroup> [0..*] <kml:when> ... </kml:when> [0..1] <kml:TimeStampSimpleExtensionGroup> ... </kml:TimeStampSimpleExtensionGroup> [0..*] <kml:TimeStampObjectExtensionGroup> ... </kml:TimeStampObjectExtensionGroup> [0..*] </kml:TimeStamp>

15.3.2

Description

This element can be used wherever the following element is referenced: •

kml:AbstractTimePrimitiveGroup

Specifies a single moment in time within the required kml:when child element. 15.3.3

Content

15.3.3.1

kml:when

15.3.3.1.1

Description

Specifies a single moment in time. 15.3.3.1.2

Content

Type: Default Value:

kml:dateTimeType none

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

187

OGC 07-147r2

15.3.3.1.3

Examples

The following examples show different temporal resolutions for the kml:when value: •

xsd:gYear (YYYY)

<TimeStamp> <when>1997</when> </TimeStamp>

xsd:gYearMonth (YYYY-MM)

<TimeStamp> <when>1997-07</when> </TimeStamp>

xsd:date (YYYY-MM-DD)

<TimeStamp> <when>1997-07-16</when> </TimeStamp>

xsd:dateTime (YYYY-MM-DDThh:mm:ssZ) Here, T is the separator between the calendar and the hourly notation of time, and Z indicates UTC. (Seconds are required.)

<TimeStamp> <when>1997-07-16T07:30:15Z</when> </TimeStamp>

xsd:dateTime (YYYY-MM-DDThh:mm:sszzzzzz) This example gives the local time and then the ± conversion to UTC.

<TimeStamp> <when>1997-07-16T10:30:15+03:00</when> </TimeStamp>

15.3.3.2

kml:TimeStampSimpleExtensionGroup

See 6.6.3.1 Simple Element Substitution. 15.3.3.3

kml: TimeStampObjectExtensionGroup

See 6.6.3.2 Complex Element Substitution.

188

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

16 Field Types

16.1 16.1.1

kml:altitudeModeEnumType Content Base XSD Type: xsd:string value comes from list: {'clampToGround'|'relativeToGround'|'absolute'}

16.2 16.2.1

clampToGround

Ignore the altitude specification.

relativeToGround

Interpret the altitude in meters relative to the terrain elevation.

absolute

Interpret the altitude as a value in meters relative to the vertical datum.

kml:angle180Type Content Base XSD Type: xsd:double -180.0 <= value <= 180.0

16.3 16.3.1

kml:angle360Type Content Base XSD Type: xsd:double -360.0 <= value <= 360.0

16.4 16.4.1

kml:angle90Type Content xsd:double Base XSD Type: -90.0 <= value <= 90.0

16.5 16.5.1

kml:anglepos180Type Content Base XSD Type: xsd:double 0.0 <= value <= 180.0

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

189

OGC 07-147r2

16.6 16.6.1

kml:anglepos90Type Content xsd:double Base XSD Type: 0.0 <= value <= 90.0

16.7 16.7.1

kml:colorModeEnumType Description

Specifies the color mode for a graphic element. Values for <colorMode> are normal (no effect) and random. A value of random applies a random linear scale to the base <color> as follows: To achieve a truly random selection of colors, specify a base <color> of transparent white (00ffffff). If a single color component is specified (for example, a value of ff0000ff for red), random color values for that one component (red) will be selected. In this case, the values would range from 00 (black) to ff (full red). If values for two or for all three color components are specified, a random linear scale is applied to each color component, with results ranging from black to the maximum values specified for each component. The opacity of a color comes from the alpha component of color and is never randomized. 16.7.2

Content Base XSD Type: xsd:string value comes from list: {'normal'|'random'} normal

Specifies a single colour value.

random

Specifies to use a random colour value.

16.8

kml:colorType

16.8.1

Description

Species the color of a graphic or text element.

190

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

Color and opacity (alpha) values are expressed in hexadecimal notation. The range of values for any one color is 0 to 255 (00 to ff); opaque white is ffffffff; opaque black is ff000000. The order of expression is aabbggrr, where aa=alpha (00 to ff); bb=blue (00 to ff); gg=green (00 to ff); rr=red (00 to ff). For alpha, 00 is fully transparent and ff is fully opaque. For example, to apply a blue color with 50 percent opacity to an overlay, specify the following: <bgColor>7fff0000</bgColor>, where alpha=0x7f, blue=0xff, green=0x00, and red=0x00. 16.8.2

Content Base XSD Type: length = 4

16.9 16.9.1

xsd:hexBinary

kml:coordinatesType Description

String representing one or more coordinate tuples, with each tuple consisting of decimal values for geodetic longitude, geodetic latitude, and altitude. The altitude component is optional. The coordinate separator is a comma and the tuple separator is a whitespace. Longitude and latitude coordinates are expressed in decimal degrees only. 16.9.2

Content List of:

xsd:string

16.10 kml:dateTimeType 16.10.1 Content Union of:

xsd:dateTime, xsd:date, xsd:gYearMonth, xsd:gYear

16.11 kml:displayModeEnumType 16.11.1 Content Base XSD Type: xsd:string value comes from list: {'default'|'hide'} default

Specifies to display the balloon.

hide

Specifies to hide the balloon.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

191

OGC 07-147r2

16.12 kml:gridOriginEnumType 16.12.1 Content string Base XSD Type: value comes from list: {'lowerLeft'|'upperLeft'} lowerLeft

Specifies to begin numbering the tiles in a layer of a kml:ImagePyramid from the lower left corner.

upperLeft

Specifies to begin numbering the tiles in a layer of kml:ImagePyramid from the upper left corner.

16.13 kml:itemIconStateEnumType 16.13.1 Description Specifies the current state of a kml:NetworkLink or kml:Folder. 16.13.2 Content Base XSD Type: xsd:string value comes from list: {'open'|'closed'|'error'|'fetching0'|'fetching1'|'fetching2'} open

open folder

closed

closed folder

error

error in fetch

fetching0

fetch state 0

fetching1

fetch state 1

fetching2

fetch state 0

16.14 kml:itemIconStateType 16.14.1 Content List of:

kml:itemIconStateEnumType

16.15 kml:listItemTypeEnumType 16.15.1 Description Specifies how a kml:AbstractFeatureGroup and its contents shall be displayed as items in a list view.

192

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

16.15.2 Content Base XSD Type: string value comes from list: {'radioFolder'|'check'|'checkHideChildren'|'checkOffOnly'} radioFolder

Only one of the kml:AbstractContainerGroup's items shall be visible at a time.

check

The kml:AbstractFeatureGroup's visibility is tied to its item's checkbox.

checkHideChildren

Use a normal checkbox for visibility but do not display the kml:AbstractContainerGroup's children in the list view. A checkbox allows the user to toggle visibility of the child objects in the viewer.

checkOffOnly

Prevents all items from being made visible at once—that is, the user can turn everything in the kml:AbstractContainerGroup off but cannot turn everything on at the same time. This setting is useful for kml:AbstractContainerGroup's containing large amounts of data.

16.16 kml:refreshModeEnumType 16.16.1 Content Base XSD Type: xsd:string value comes from list: {'onChange'|'onInterval'|'onExpire'} onChange

Refresh when the resource is first loaded and whenever the kml:Link parameters change.

onInterval

Refresh the resource every n seconds as specified in kml:refreshInterval.

onExpire

Refresh the resource when the expiration time is reached.

16.17 kml:shapeEnumType 16.17.1 Content Base XSD Type: string value comes from list: {'rectangle'|'cylinder'|'sphere'} rectangle

Used for an ordinary photo.

cylinder

Used for panoramas, which can be either partial or full cylinders.

sphere

Used for spherical panoramas.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

193

OGC 07-147r2

16.18 kml:styleStateEnumType 16.18.1 Content xsd:string Base XSD Type: value comes from list: {'normal'|'highlight'} normal

Specifies a normal style for a kml:Placemark.

highlight

Specifies a highlighted style for a kml:Placemark.

16.19 kml:SnippetType 16.19.1 Content Type:

xsd:string

16.19.2 Attributes 16.19.2.1 maxLines 16.19.2.1.1 Description

Specifies the maximum number of lines to display for the kml:AbstractFeatureGroup kml:snippet value in the list view. 16.19.2.1.2 Content

Type: Default Value:

xsd:int 2

16.20 kml:unitsEnumType 16.20.1 Description 16.20.2 Content Base XSD Type: xsd:string value comes from list: {'fraction'|'pixels'|'insetPixels'}

194

fraction

Value is a fraction of the icon.

pixels

Value is a specific pixel size.

insetPixels

Value is an offset in pixels from the upper right corner of the icon.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

16.21 kml:vec2Type 16.21.1 Structure <... x="double [0..1]" y="double [0..1]" xunits=" kml:unitsEnumType [0..1]" yunits=" kml:unitsEnumType [0..1]"/>

16.21.2 Description Specifies an image coordinate system. The x and y values may each be specified in three different ways: as pixels (pixels), as fractions of the icon (fraction), or as inset pixels (insetPixels), which is an offset in pixels from the upper right corner of the icon. They may or may not be specified in a consistent manner - for example, x can be specified in pixels and y as a fraction. 16.21.3 Attributes 16.21.3.1 x 16.21.3.1.1 Description

The x component of a point. 16.21.3.1.2 Content

Type: Default Value:

xsd:double 1.0

16.21.3.2 y 16.21.3.2.1 Description

The y component of a point. 16.21.3.2.2 Content

Type: Default Value:

xsd:double 1.0

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

195

OGC 07-147r2

16.21.3.3 xunits 16.21.3.3.1 Description

Units in which the x value is specified. 16.21.3.3.2 Content

Type: Default Value:

kml:unitsEnumType fraction

16.21.3.4 yunits

16.21.3.4.1 Description

Units in which the y value is specified. 16.21.3.4.2 Content

FieldType: Default Value:

kml:unitsEnumType fraction

16.22 kml:viewRefreshModeEnumType 16.22.1 Content Base XSD Type: string value comes from list: {'never'|'onRequest'|'onStop'|'onRegion'}

196

never

Ignore changes in the geographic view. Also ignore kml:viewFormat parameters, if any.

onRequest

Refresh the resource only when the user explicitly requests it.

onStop

Refresh the resource n seconds after movement stops, where n is specified in kml:viewRefreshTime.

onRegion

Refresh the resource if a kml:Region becomes active.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

Annex A (normative) KML Schemas

In addition to this document, this specification includes normative XML Schema Document files. The OGC KML Schema Documents are posted online at the URL http://schemas.opengis.net/kml/2.2.0/. In the event of a discrepancy between the below schemas and online versions of the XML Schema files, the online files shall be considered authoritative.

KML schema (ogckml22.xsd) <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xal="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" targetNamespace="http://www.opengis.net/kml/2.2" elementFormDefault="qualified" version="2.2.0"> <annotation> <appinfo>ogckml22.xsd 2008-01-23</appinfo> <documentation>XML Schema Document for OGC KML version 2.2. Copyright (c) 2008 Open Geospatial Consortium, Inc. All Rights Reserved. </documentation> </annotation> <!-- import atom:author and atom:link --> <import namespace="http://www.w3.org/2005/Atom" schemaLocation="atom-author-link.xsd"/> <!-- import xAL:Address --> <import namespace="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" schemaLocation="http://docs.oasisopen.org/election/external/xAL.xsd"/> <!-- KML field types (simple content) --> <simpleType name="anglepos90Type"> <restriction base="double"> <minInclusive value="0.0"/> <maxInclusive value="90.0"/> </restriction> </simpleType> <simpleType name="angle90Type">

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

197

OGC 07-147r2

<restriction base="double"> <minInclusive value="-90"/> <maxInclusive value="90.0"/> </restriction> </simpleType> <simpleType name="anglepos180Type"> <restriction base="double"> <minInclusive value="0.0"/> <maxInclusive value="180.0"/> </restriction> </simpleType> <simpleType name="angle180Type"> <restriction base="double"> <minInclusive value="-180.0"/> <maxInclusive value="180.0"/> </restriction> </simpleType> <simpleType name="angle360Type"> <restriction base="double"> <minInclusive value="-360.0"/> <maxInclusive value="360.0"/> </restriction> </simpleType> <simpleType name="altitudeModeEnumType"> <restriction base="string"> <enumeration value="clampToGround"/> <enumeration value="relativeToGround"/> <enumeration value="absolute"/> </restriction> </simpleType> <simpleType name="colorType"> <annotation> <documentation><![CDATA[ aabbggrr ffffffff: opaque white ff000000: opaque black ]]></documentation> </annotation> <restriction base="hexBinary"> <length value="4"/> </restriction> </simpleType> <simpleType name="coordinatesType"> <list itemType="string"/> </simpleType>

198

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<simpleType name="colorModeEnumType"> <restriction base="string"> <enumeration value="normal"/> <enumeration value="random"/> </restriction> </simpleType> <simpleType name="dateTimeType"> <union memberTypes="dateTime date gYearMonth gYear"/> </simpleType> <simpleType name="displayModeEnumType"> <restriction base="string"> <enumeration value="default"/> <enumeration value="hide"/> </restriction> </simpleType> <simpleType name="gridOriginEnumType"> <restriction base="string"> <enumeration value="lowerLeft"/> <enumeration value="upperLeft"/> </restriction> </simpleType> <simpleType name="itemIconStateType"> <list itemType="kml:itemIconStateEnumType"/> </simpleType> <simpleType name="itemIconStateEnumType"> <restriction base="string"> <enumeration value="open"/> <enumeration value="closed"/> <enumeration value="error"/> <enumeration value="fetching0"/> <enumeration value="fetching1"/> <enumeration value="fetching2"/> </restriction> </simpleType> <simpleType name="listItemTypeEnumType"> <restriction base="string"> <enumeration value="radioFolder"/> <enumeration value="check"/> <enumeration value="checkHideChildren"/> <enumeration value="checkOffOnly"/> </restriction> </simpleType> <simpleType name="refreshModeEnumType"> <restriction base="string"> <enumeration value="onChange"/> <enumeration value="onInterval"/> <enumeration value="onExpire"/> </restriction> </simpleType>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

199

OGC 07-147r2

<simpleType name="viewRefreshModeEnumType"> <restriction base="string"> <enumeration value="never"/> <enumeration value="onRequest"/> <enumeration value="onStop"/> <enumeration value="onRegion"/> </restriction> </simpleType> <simpleType name="shapeEnumType"> <restriction base="string"> <enumeration value="rectangle"/> <enumeration value="cylinder"/> <enumeration value="sphere"/> </restriction> </simpleType> <simpleType name="styleStateEnumType"> <restriction base="string"> <enumeration value="normal"/> <enumeration value="highlight"/> </restriction> </simpleType> <simpleType name="unitsEnumType"> <restriction base="string"> <enumeration value="fraction"/> <enumeration value="pixels"/> <enumeration value="insetPixels"/> </restriction> </simpleType> <complexType name="vec2Type" abstract="false"> <attribute name="x" type="double" default="1.0"/> <attribute name="y" type="double" default="1.0"/> <attribute name="xunits" type="kml:unitsEnumType" use="optional" default="fraction"/> <attribute name="yunits" type="kml:unitsEnumType" use="optional" default="fraction"/> </complexType> <element name="address" type="string"/> <element name="altitude" type="double" default="0.0"/> <element name="altitudeModeGroup" abstract="true"/> <element name="altitudeMode" type="kml:altitudeModeEnumType" default="clampToGround" substitutionGroup="kml:altitudeModeGroup"/> <element name="begin" type="kml:dateTimeType"/> <element name="bgColor" type="kml:colorType" default="ffffffff"/> <element name="bottomFov" type="kml:angle90Type" default="0.0"/> <element name="color" type="kml:colorType" default="ffffffff"/> <element name="colorMode" type="kml:colorModeEnumType" default="normal"/> <element name="cookie" type="string"/> <element name="coordinates" type="kml:coordinatesType"/>

200

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<element name="description" type="string"/> <element name="displayName" type="string"/> <element name="displayMode" type="kml:displayModeEnumType" default="default"/> <element name="drawOrder" type="int" default="0"/> <element name="east" type="kml:angle180Type" default="180.0"/> <element name="end" type="kml:dateTimeType"/> <element name="expires" type="kml:dateTimeType"/> <element name="extrude" type="boolean" default="0"/> <element name="fill" type="boolean" default="1"/> <element name="flyToView" type="boolean" default="0"/> <element name="gridOrigin" type="kml:gridOriginEnumType" default="lowerLeft"/> <element name="heading" type="kml:angle360Type" default="0.0"/> <element name="href" type="string"> <annotation> <documentation>not anyURI due to $[x] substitution in PhotoOverlay</documentation> </annotation> </element> <element name="httpQuery" type="string"/> <element name="hotSpot" type="kml:vec2Type"/> <element name="key" type="kml:styleStateEnumType" default="normal"/> <element name="latitude" type="kml:angle90Type" default="0.0"/> <element name="leftFov" type="kml:angle180Type" default="0.0"/> <element name="linkDescription" type="string"/> <element name="linkName" type="string"/> <element name="linkSnippet" type="kml:SnippetType"/> <element name="listItemType" type="kml:listItemTypeEnumType" default="check"/> <element name="longitude" type="kml:angle180Type" default="0.0"/> <element name="maxSnippetLines" type="int" default="2"/> <element name="maxSessionLength" type="double" default="-1.0"/> <element name="message" type="string"/> <element name="minAltitude" type="double" default="0.0"/> <element name="minFadeExtent" type="double" default="0.0"/> <element name="minLodPixels" type="double" default="0.0"/> <element name="minRefreshPeriod" type="double" default="0.0"/> <element name="maxAltitude" type="double" default="0.0"/> <element name="maxFadeExtent" type="double" default="0.0"/> <element name="maxLodPixels" type="double" default="-1.0"/> <element name="maxHeight" type="int" default="0"/> <element name="maxWidth" type="int" default="0"/> <element name="name" type="string"/> <element name="near" type="double" default="0.0"/> <element name="north" type="kml:angle180Type" default="180.0"/> <element name="open" type="boolean" default="0"/> <element name="outline" type="boolean" default="1"/> <element name="overlayXY" type="kml:vec2Type"/> <element name="phoneNumber" type="string"/> <element name="range" type="double" default="0.0"/> <element name="refreshMode" type="kml:refreshModeEnumType" default="onChange"/> <element name="refreshInterval" type="double" default="4.0"/> <element name="refreshVisibility" type="boolean" default="0"/>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

201

OGC 07-147r2

<element name="rightFov" type="kml:angle180Type" default="0.0"/> <element name="roll" type="kml:angle180Type" default="0.0"/> <element name="rotation" type="kml:angle180Type" default="0.0"/> <element name="rotationXY" type="kml:vec2Type"/> <element name="scale" type="double" default="1.0"/> <element name="screenXY" type="kml:vec2Type"/> <element name="shape" type="kml:shapeEnumType" default="rectangle"/> <element name="size" type="kml:vec2Type"/> <element name="south" type="kml:angle180Type" default="-180.0"/> <element name="sourceHref" type="anyURI"/> <element name="snippet" type="string"/> <element name="state" type="kml:itemIconStateType"/> <element name="styleUrl" type="anyURI"/> <element name="targetHref" type="anyURI"/> <element name="tessellate" type="boolean" default="0"/> <element name="text" type="string"/> <element name="textColor" type="kml:colorType" default="ff000000"/> <element name="tileSize" type="int" default="256"/> <element name="tilt" type="kml:anglepos180Type" default="0.0"/> <element name="topFov" type="kml:angle90Type" default="0.0"/> <element name="value" type="string"/> <element name="viewBoundScale" type="double" default="1.0"/> <element name="viewFormat" type="string"/> <element name="viewRefreshMode" type="kml:viewRefreshModeEnumType" default="never"/> <element name="viewRefreshTime" type="double" default="4.0"/> <element name="visibility" type="boolean" default="1"/> <element name="west" type="kml:angle180Type" default="-180.0"/> <element name="when" type="kml:dateTimeType"/> <element name="width" type="double" default="1.0"/> <element name="x" type="double" default="1.0"/> <element name="y" type="double" default="1.0"/> <element name="z" type="double" default="1.0"/> <element name="AbstractObjectGroup" type="kml:AbstractObjectType" abstract="true"/> <complexType name="AbstractObjectType" abstract="true"> <sequence> <element ref="kml:ObjectSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attributeGroup ref="kml:idAttributes"/> </complexType> <element name="ObjectSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <attributeGroup name="idAttributes"> <attribute name="id" type="ID" use="optional"/> <attribute name="targetId" type="NCName" use="optional"/> </attributeGroup> <element name="AbstractFeatureGroup" type="kml:AbstractFeatureType" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="AbstractFeatureType" abstract="true"> <complexContent>

202

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:name" minOccurs="0"/> <element ref="kml:visibility" minOccurs="0"/> <element ref="kml:open" minOccurs="0"/> <element ref="atom:author" minOccurs="0"/> <element ref="atom:link" minOccurs="0"/> <element ref="kml:address" minOccurs="0"/> <element ref="xal:AddressDetails" minOccurs="0"/> <element ref="kml:phoneNumber" minOccurs="0"/> <choice> <annotation> <documentation>Snippet deprecated in 2.2</documentation> </annotation> <element ref="kml:Snippet" minOccurs="0"/> <element ref="kml:snippet" minOccurs="0"/> </choice> <element ref="kml:description" minOccurs="0"/> <element ref="kml:AbstractViewGroup" minOccurs="0"/> <element ref="kml:AbstractTimePrimitiveGroup" minOccurs="0"/> <element ref="kml:styleUrl" minOccurs="0"/> <element ref="kml:AbstractStyleSelectorGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:Region" minOccurs="0"/> <choice> <annotation> <documentation>Metadata deprecated in 2.2</documentation> </annotation> <element ref="kml:Metadata" minOccurs="0"/> <element ref="kml:ExtendedData" minOccurs="0"/> </choice> <element ref="kml:AbstractFeatureSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:AbstractFeatureObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="AbstractFeatureObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="AbstractFeatureSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="Snippet" type="kml:SnippetType"/> <complexType name="SnippetType" final="#all"> <simpleContent> <extension base="string"> <attribute name="maxLines" type="int" use="optional" default="2"/> </extension> </simpleContent> </complexType>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

203

OGC 07-147r2

<element name="AbstractViewGroup" type="kml:AbstractViewType" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="AbstractViewType" abstract="true"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:AbstractViewSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:AbstractViewObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="AbstractViewSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="AbstractViewObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="LookAt" type="kml:LookAtType" substitutionGroup="kml:AbstractViewGroup"/> <complexType name="LookAtType" final="#all"> <complexContent> <extension base="kml:AbstractViewType"> <sequence> <element ref="kml:longitude" minOccurs="0"/> <element ref="kml:latitude" minOccurs="0"/> <element ref="kml:altitude" minOccurs="0"/> <element ref="kml:heading" minOccurs="0"/> <element ref="kml:tilt" minOccurs="0"/> <element ref="kml:range" minOccurs="0"/> <element ref="kml:altitudeModeGroup" minOccurs="0"/> <element ref="kml:LookAtSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:LookAtObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="LookAtSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="LookAtObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Camera" type="kml:CameraType" substitutionGroup="kml:AbstractViewGroup"/> <complexType name="CameraType" final="#all"> <complexContent> <extension base="kml:AbstractViewType"> <sequence> <element ref="kml:longitude" minOccurs="0"/>

204

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<element ref="kml:latitude" minOccurs="0"/> <element ref="kml:altitude" minOccurs="0"/> <element ref="kml:heading" minOccurs="0"/> <element ref="kml:tilt" minOccurs="0"/> <element ref="kml:roll" minOccurs="0"/> <element ref="kml:altitudeModeGroup" minOccurs="0"/> <element ref="kml:CameraSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:CameraObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="CameraSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="CameraObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Metadata" type="kml:MetadataType"> <annotation> <documentation>Metadata deprecated in 2.2</documentation> </annotation> </element> <complexType name="MetadataType" final="#all"> <annotation> <documentation>MetadataType deprecated in 2.2</documentation> </annotation> <sequence> <any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> <element name="ExtendedData" type="kml:ExtendedDataType"/> <complexType name="ExtendedDataType" final="#all"> <sequence> <element ref="kml:Data" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:SchemaData" minOccurs="0" maxOccurs="unbounded"/> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> <element name="SchemaData" type="kml:SchemaDataType" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="SchemaDataType" final="#all"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:SimpleData" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:SchemaDataExtension" minOccurs="0" maxOccurs="unbounded"/>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

205

OGC 07-147r2

</sequence> <attribute name="schemaUrl" type="anyURI"/> </extension> </complexContent> </complexType> <element name="SchemaDataExtension" abstract="true"/> <element name="SimpleData" type="kml:SimpleDataType"/> <complexType name="SimpleDataType" final="#all"> <simpleContent> <extension base="string"> <attribute name="name" type="string" use="required"/> </extension> </simpleContent> </complexType> <element name="Data" type="kml:DataType" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="DataType" final="#all"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:displayName" minOccurs="0"/> <element ref="kml:value"/> <element ref="kml:DataExtension" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attribute name="name" type="string"/> </extension> </complexContent> </complexType> <element name="DataExtension" abstract="true"/> <element name="AbstractContainerGroup" type="kml:AbstractContainerType" abstract="true" substitutionGroup="kml:AbstractFeatureGroup"/> <complexType name="AbstractContainerType" abstract="true"> <complexContent> <extension base="kml:AbstractFeatureType"> <sequence> <element ref="kml:AbstractContainerSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:AbstractContainerObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="AbstractContainerSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="AbstractContainerObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="AbstractGeometryGroup" type="kml:AbstractGeometryType" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="AbstractGeometryType" abstract="true">

206

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:AbstractGeometrySimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:AbstractGeometryObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="AbstractGeometrySimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="AbstractGeometryObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="AbstractOverlayGroup" type="kml:AbstractOverlayType" abstract="true" substitutionGroup="kml:AbstractFeatureGroup"/> <complexType name="AbstractOverlayType" abstract="true"> <complexContent> <extension base="kml:AbstractFeatureType"> <sequence> <element ref="kml:color" minOccurs="0"/> <element ref="kml:drawOrder" minOccurs="0"/> <element ref="kml:Icon" minOccurs="0"/> <element ref="kml:AbstractOverlaySimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:AbstractOverlayObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="AbstractOverlaySimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="AbstractOverlayObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="AbstractStyleSelectorGroup" type="kml:AbstractStyleSelectorType" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="AbstractStyleSelectorType" abstract="true"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:AbstractStyleSelectorSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:AbstractStyleSelectorObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

207

OGC 07-147r2

</complexContent> </complexType> <element name="AbstractStyleSelectorSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="AbstractStyleSelectorObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="AbstractTimePrimitiveGroup" type="kml:AbstractTimePrimitiveType" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="AbstractTimePrimitiveType" abstract="true"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:AbstractTimePrimitiveSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:AbstractTimePrimitiveObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="AbstractTimePrimitiveSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="AbstractTimePrimitiveObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="kml" type="kml:KmlType"> <annotation> <documentation><![CDATA[ <kml> is the root element. ]]></documentation> </annotation> </element> <complexType name="KmlType" final="#all"> <sequence> <element ref="kml:NetworkLinkControl" minOccurs="0"/> <element ref="kml:AbstractFeatureGroup" minOccurs="0"/> <element ref="kml:KmlSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:KmlObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attribute name="hint" type="string"/> </complexType> <element name="KmlSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="KmlObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/>

208

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<element name="NetworkLinkControl" type="kml:NetworkLinkControlType"/> <complexType name="NetworkLinkControlType" final="#all"> <sequence> <element ref="kml:minRefreshPeriod" minOccurs="0"/> <element ref="kml:maxSessionLength" minOccurs="0"/> <element ref="kml:cookie" minOccurs="0"/> <element ref="kml:message" minOccurs="0"/> <element ref="kml:linkName" minOccurs="0"/> <element ref="kml:linkDescription" minOccurs="0"/> <element ref="kml:linkSnippet" minOccurs="0"/> <element ref="kml:expires" minOccurs="0"/> <element ref="kml:Update" minOccurs="0"/> <element ref="kml:AbstractViewGroup" minOccurs="0"/> <element ref="kml:NetworkLinkControlSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:NetworkLinkControlObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> <element name="NetworkLinkControlSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="NetworkLinkControlObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Document" type="kml:DocumentType" substitutionGroup="kml:AbstractContainerGroup"/> <complexType name="DocumentType" final="#all"> <complexContent> <extension base="kml:AbstractContainerType"> <sequence> <element ref="kml:Schema" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:AbstractFeatureGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:DocumentSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:DocumentObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="DocumentSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="DocumentObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Schema" type="kml:SchemaType"/> <complexType name="SchemaType" final="#all"> <sequence> <element ref="kml:SimpleField" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:SchemaExtension" minOccurs="0" maxOccurs="unbounded"/>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

209

OGC 07-147r2

</sequence> <attribute name="name" type="string"/> <attribute name="id" type="ID"/> </complexType> <element name="SchemaExtension" abstract="true"/> <element name="SimpleField" type="kml:SimpleFieldType"/> <complexType name="SimpleFieldType" final="#all"> <sequence> <element ref="kml:displayName" minOccurs="0"/> <element ref="kml:SimpleFieldExtension" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attribute name="type" type="string"/> <attribute name="name" type="string"/> </complexType> <element name="SimpleFieldExtension" abstract="true"/> <element name="Folder" type="kml:FolderType" substitutionGroup="kml:AbstractContainerGroup"/> <complexType name="FolderType" final="#all"> <complexContent> <extension base="kml:AbstractContainerType"> <sequence> <element ref="kml:AbstractFeatureGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:FolderSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:FolderObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="FolderSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="FolderObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Placemark" type="kml:PlacemarkType" substitutionGroup="kml:AbstractFeatureGroup"/> <complexType name="PlacemarkType" final="#all"> <complexContent> <extension base="kml:AbstractFeatureType"> <sequence> <element ref="kml:AbstractGeometryGroup" minOccurs="0"/> <element ref="kml:PlacemarkSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:PlacemarkObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="PlacemarkSimpleExtensionGroup" abstract="true"

210

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

type="anySimpleType"/> <element name="PlacemarkObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="NetworkLink" type="kml:NetworkLinkType" substitutionGroup="kml:AbstractFeatureGroup"/> <complexType name="NetworkLinkType" final="#all"> <complexContent> <extension base="kml:AbstractFeatureType"> <sequence> <element ref="kml:refreshVisibility" minOccurs="0"/> <element ref="kml:flyToView" minOccurs="0"/> <choice> <annotation> <documentation>Url deprecated in 2.2</documentation> </annotation> <element ref="kml:Url" minOccurs="0"/> <element ref="kml:Link" minOccurs="0"/> </choice> <element ref="kml:NetworkLinkSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:NetworkLinkObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="NetworkLinkSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="NetworkLinkObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Region" type="kml:RegionType" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="RegionType" final="#all"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:LatLonAltBox" minOccurs="0"/> <element ref="kml:Lod" minOccurs="0"/> <element ref="kml:RegionSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:RegionObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="RegionSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="RegionObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="LatLonAltBox" type="kml:LatLonAltBoxType" substitutionGroup="kml:AbstractObjectGroup"/>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

211

OGC 07-147r2

<complexType name="LatLonAltBoxType" final="#all"> <complexContent> <extension base="kml:AbstractLatLonBoxType"> <sequence> <element ref="kml:minAltitude" minOccurs="0"/> <element ref="kml:maxAltitude" minOccurs="0"/> <element ref="kml:altitudeModeGroup" minOccurs="0"/> <element ref="kml:LatLonAltBoxSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:LatLonAltBoxObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="LatLonAltBoxSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="LatLonAltBoxObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Lod" type="kml:LodType" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="LodType" final="#all"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:minLodPixels" minOccurs="0"/> <element ref="kml:maxLodPixels" minOccurs="0"/> <element ref="kml:minFadeExtent" minOccurs="0"/> <element ref="kml:maxFadeExtent" minOccurs="0"/> <element ref="kml:LodSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:LodObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="LodSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="LodObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Icon" type="kml:LinkType" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Link" type="kml:LinkType" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Url" type="kml:LinkType" substitutionGroup="kml:AbstractObjectGroup"> <annotation> <documentation>Url deprecated in 2.2</documentation> </annotation> </element>

212

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<complexType name="LinkType" final="#all"> <complexContent> <extension base="kml:BasicLinkType"> <sequence> <element ref="kml:refreshMode" minOccurs="0"/> <element ref="kml:refreshInterval" minOccurs="0"/> <element ref="kml:viewRefreshMode" minOccurs="0"/> <element ref="kml:viewRefreshTime" minOccurs="0"/> <element ref="kml:viewBoundScale" minOccurs="0"/> <element ref="kml:viewFormat" minOccurs="0"/> <element ref="kml:httpQuery" minOccurs="0"/> <element ref="kml:LinkSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:LinkObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="LinkSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="LinkObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="MultiGeometry" type="kml:MultiGeometryType" substitutionGroup="kml:AbstractGeometryGroup"/> <complexType name="MultiGeometryType" final="#all"> <complexContent> <extension base="kml:AbstractGeometryType"> <sequence> <element ref="kml:AbstractGeometryGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:MultiGeometrySimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:MultiGeometryObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="MultiGeometrySimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="MultiGeometryObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Point" type="kml:PointType" substitutionGroup="kml:AbstractGeometryGroup"/> <complexType name="PointType" final="#all"> <complexContent> <extension base="kml:AbstractGeometryType"> <sequence> <element ref="kml:extrude" minOccurs="0"/> <element ref="kml:altitudeModeGroup" minOccurs="0"/>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

213

OGC 07-147r2

<element ref="kml:coordinates" minOccurs="0"/> <element ref="kml:PointSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:PointObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="PointSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="PointObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="LineString" type="kml:LineStringType" substitutionGroup="kml:AbstractGeometryGroup"/> <complexType name="LineStringType" final="#all"> <complexContent> <extension base="kml:AbstractGeometryType"> <sequence> <element ref="kml:extrude" minOccurs="0"/> <element ref="kml:tessellate" minOccurs="0"/> <element ref="kml:altitudeModeGroup" minOccurs="0"/> <element ref="kml:coordinates" minOccurs="0"/> <element ref="kml:LineStringSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:LineStringObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="LineStringSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="LineStringObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="LinearRing" type="kml:LinearRingType" substitutionGroup="kml:AbstractGeometryGroup"/> <complexType name="LinearRingType" final="#all"> <complexContent> <extension base="kml:AbstractGeometryType"> <sequence> <element ref="kml:extrude" minOccurs="0"/> <element ref="kml:tessellate" minOccurs="0"/> <element ref="kml:altitudeModeGroup" minOccurs="0"/> <element ref="kml:coordinates" minOccurs="0"/> <element ref="kml:LinearRingSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:LinearRingObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType>

214

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<element name="LinearRingSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="LinearRingObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Polygon" type="kml:PolygonType" substitutionGroup="kml:AbstractGeometryGroup"/> <complexType name="PolygonType" final="#all"> <complexContent> <extension base="kml:AbstractGeometryType"> <sequence> <element ref="kml:extrude" minOccurs="0"/> <element ref="kml:tessellate" minOccurs="0"/> <element ref="kml:altitudeModeGroup" minOccurs="0"/> <element ref="kml:outerBoundaryIs" minOccurs="0"/> <element ref="kml:innerBoundaryIs" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:PolygonSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:PolygonObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="PolygonSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="PolygonObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="outerBoundaryIs" type="kml:BoundaryType"/> <element name="innerBoundaryIs" type="kml:BoundaryType"/> <complexType name="BoundaryType" final="#all"> <sequence> <element ref="kml:LinearRing" minOccurs="0"/> <element ref="kml:BoundarySimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:BoundaryObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> <element name="BoundarySimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="BoundaryObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Model" type="kml:ModelType" substitutionGroup="kml:AbstractGeometryGroup"/> <complexType name="ModelType" final="#all"> <complexContent> <extension base="kml:AbstractGeometryType"> <sequence> <element ref="kml:altitudeModeGroup" minOccurs="0"/> <element ref="kml:Location" minOccurs="0"/> <element ref="kml:Orientation" minOccurs="0"/>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

215

OGC 07-147r2

<element ref="kml:Scale" minOccurs="0"/> <element ref="kml:Link" minOccurs="0"/> <element ref="kml:ResourceMap" minOccurs="0"/> <element ref="kml:ModelSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:ModelObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="ModelSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="ModelObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Location" type="kml:LocationType" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="LocationType" final="#all"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:longitude" minOccurs="0"/> <element ref="kml:latitude" minOccurs="0"/> <element ref="kml:altitude" minOccurs="0"/> <element ref="kml:LocationSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:LocationObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="LocationSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="LocationObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Orientation" type="kml:OrientationType" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="OrientationType" final="#all"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:heading" minOccurs="0"/> <element ref="kml:tilt" minOccurs="0"/> <element ref="kml:roll" minOccurs="0"/> <element ref="kml:OrientationSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:OrientationObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType>

216

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<element name="OrientationSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="OrientationObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Scale" type="kml:ScaleType" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="ScaleType" final="#all"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:x" minOccurs="0"/> <element ref="kml:y" minOccurs="0"/> <element ref="kml:z" minOccurs="0"/> <element ref="kml:ScaleSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:ScaleObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="ScaleSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="ScaleObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="ResourceMap" type="kml:ResourceMapType" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="ResourceMapType" final="#all"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:Alias" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:ResourceMapSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:ResourceMapObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="ResourceMapSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="ResourceMapObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Alias" type="kml:AliasType" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="AliasType" final="#all"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:targetHref" minOccurs="0"/> <element ref="kml:sourceHref" minOccurs="0"/>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

217

OGC 07-147r2

<element ref="kml:AliasSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:AliasObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="AliasSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="AliasObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="GroundOverlay" type="kml:GroundOverlayType" substitutionGroup="kml:AbstractOverlayGroup"/> <complexType name="GroundOverlayType" final="#all"> <complexContent> <extension base="kml:AbstractOverlayType"> <sequence> <element ref="kml:altitude" minOccurs="0"/> <element ref="kml:altitudeModeGroup" minOccurs="0"/> <element ref="kml:LatLonBox" minOccurs="0"/> <element ref="kml:GroundOverlaySimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:GroundOverlayObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="GroundOverlaySimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="GroundOverlayObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="AbstractLatLonBoxType" abstract="true"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:north" minOccurs="0"/> <element ref="kml:south" minOccurs="0"/> <element ref="kml:east" minOccurs="0"/> <element ref="kml:west" minOccurs="0"/> <element ref="kml:AbstractLatLonBoxSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:AbstractLatLonBoxObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="AbstractLatLonBoxSimpleExtensionGroup" abstract="true" type="anySimpleType"/>

218

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<element name="AbstractLatLonBoxObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="LatLonBox" type="kml:LatLonBoxType" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="LatLonBoxType" final="#all"> <complexContent> <extension base="kml:AbstractLatLonBoxType"> <sequence> <element ref="kml:rotation" minOccurs="0"/> <element ref="kml:LatLonBoxSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:LatLonBoxObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="LatLonBoxSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="LatLonBoxObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="ScreenOverlay" type="kml:ScreenOverlayType" substitutionGroup="kml:AbstractOverlayGroup"/> <complexType name="ScreenOverlayType" final="#all"> <complexContent> <extension base="kml:AbstractOverlayType"> <sequence> <element ref="kml:overlayXY" minOccurs="0"/> <element ref="kml:screenXY" minOccurs="0"/> <element ref="kml:rotationXY" minOccurs="0"/> <element ref="kml:size" minOccurs="0"/> <element ref="kml:rotation" minOccurs="0"/> <element ref="kml:ScreenOverlaySimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:ScreenOverlayObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="ScreenOverlaySimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="ScreenOverlayObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="PhotoOverlay" type="kml:PhotoOverlayType" substitutionGroup="kml:AbstractOverlayGroup"/> <complexType name="PhotoOverlayType" final="#all"> <complexContent> <extension base="kml:AbstractOverlayType"> <sequence>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

219

OGC 07-147r2

<element ref="kml:rotation" minOccurs="0"/> <element ref="kml:ViewVolume" minOccurs="0"/> <element ref="kml:ImagePyramid" minOccurs="0"/> <element ref="kml:Point" minOccurs="0"/> <element ref="kml:shape" minOccurs="0"/> <element ref="kml:PhotoOverlaySimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:PhotoOverlayObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="PhotoOverlaySimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="PhotoOverlayObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="ViewVolume" type="kml:ViewVolumeType" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="ViewVolumeType" final="#all"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:leftFov" minOccurs="0"/> <element ref="kml:rightFov" minOccurs="0"/> <element ref="kml:bottomFov" minOccurs="0"/> <element ref="kml:topFov" minOccurs="0"/> <element ref="kml:near" minOccurs="0"/> <element ref="kml:ViewVolumeSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:ViewVolumeObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="ViewVolumeSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="ViewVolumeObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="ImagePyramid" type="kml:ImagePyramidType" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="ImagePyramidType" final="#all"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:tileSize" minOccurs="0"/> <element ref="kml:maxWidth" minOccurs="0"/> <element ref="kml:maxHeight" minOccurs="0"/> <element ref="kml:gridOrigin" minOccurs="0"/>

220

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<element ref="kml:ImagePyramidSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:ImagePyramidObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="ImagePyramidSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="ImagePyramidObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Style" type="kml:StyleType" substitutionGroup="kml:AbstractStyleSelectorGroup"/> <complexType name="StyleType" final="#all"> <complexContent> <extension base="kml:AbstractStyleSelectorType"> <sequence> <element ref="kml:IconStyle" minOccurs="0"/> <element ref="kml:LabelStyle" minOccurs="0"/> <element ref="kml:LineStyle" minOccurs="0"/> <element ref="kml:PolyStyle" minOccurs="0"/> <element ref="kml:BalloonStyle" minOccurs="0"/> <element ref="kml:ListStyle" minOccurs="0"/> <element ref="kml:StyleSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:StyleObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="StyleSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="StyleObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="StyleMap" type="kml:StyleMapType" substitutionGroup="kml:AbstractStyleSelectorGroup"/> <complexType name="StyleMapType" final="#all"> <complexContent> <extension base="kml:AbstractStyleSelectorType"> <sequence> <element ref="kml:Pair" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:StyleMapSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:StyleMapObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

221

OGC 07-147r2

<element name="StyleMapSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="StyleMapObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Pair" type="kml:PairType" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="PairType" final="#all"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:key" minOccurs="0"/> <element ref="kml:styleUrl" minOccurs="0"/> <element ref="kml:AbstractStyleSelectorGroup" minOccurs="0"/> <element ref="kml:PairSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:PairObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="PairSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="PairObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="AbstractSubStyleGroup" type="kml:AbstractSubStyleType" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="AbstractSubStyleType" abstract="true"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:AbstractSubStyleSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:AbstractSubStyleObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="AbstractSubStyleSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="AbstractSubStyleObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="AbstractColorStyleGroup" type="kml:AbstractColorStyleType" abstract="true" substitutionGroup="kml:AbstractSubStyleGroup"/> <complexType name="AbstractColorStyleType" abstract="true"> <complexContent> <extension base="kml:AbstractSubStyleType"> <sequence>

222

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<element ref="kml:color" minOccurs="0"/> <element ref="kml:colorMode" minOccurs="0"/> <element ref="kml:AbstractColorStyleSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:AbstractColorStyleObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="AbstractColorStyleObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="AbstractColorStyleSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="IconStyle" type="kml:IconStyleType" substitutionGroup="kml:AbstractColorStyleGroup"/> <complexType name="IconStyleType" final="#all"> <complexContent> <extension base="kml:AbstractColorStyleType"> <sequence> <element ref="kml:scale" minOccurs="0"/> <element ref="kml:heading" minOccurs="0"/> <element name="Icon" type="kml:BasicLinkType" minOccurs="0"/> <element ref="kml:hotSpot" minOccurs="0"/> <element ref="kml:IconStyleSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:IconStyleObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="IconStyleSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="IconStyleObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="BasicLinkType"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:href" minOccurs="0"/> <element ref="kml:BasicLinkSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:BasicLinkObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="BasicLinkSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="BasicLinkObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

223

OGC 07-147r2

<element name="LabelStyle" type="kml:LabelStyleType" substitutionGroup="kml:AbstractColorStyleGroup"/> <complexType name="LabelStyleType" final="#all"> <complexContent> <extension base="kml:AbstractColorStyleType"> <sequence> <element ref="kml:scale" minOccurs="0"/> <element ref="kml:LabelStyleSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:LabelStyleObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="LabelStyleSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="LabelStyleObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="LineStyle" type="kml:LineStyleType" substitutionGroup="kml:AbstractColorStyleGroup"/> <complexType name="LineStyleType" final="#all"> <complexContent> <extension base="kml:AbstractColorStyleType"> <sequence> <element ref="kml:width" minOccurs="0"/> <element ref="kml:LineStyleSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:LineStyleObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="LineStyleSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="LineStyleObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="PolyStyle" type="kml:PolyStyleType" substitutionGroup="kml:AbstractColorStyleGroup"/> <complexType name="PolyStyleType" final="#all"> <complexContent> <extension base="kml:AbstractColorStyleType"> <sequence> <element ref="kml:fill" minOccurs="0"/> <element ref="kml:outline" minOccurs="0"/> <element ref="kml:PolyStyleSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:PolyStyleObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension>

224

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

</complexContent> </complexType> <element name="PolyStyleSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="PolyStyleObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="BalloonStyle" type="kml:BalloonStyleType" substitutionGroup="kml:AbstractSubStyleGroup"/> <complexType name="BalloonStyleType" final="#all"> <complexContent> <extension base="kml:AbstractSubStyleType"> <sequence> <choice> <annotation> <documentation>color deprecated in 2.1</documentation> </annotation> <element ref="kml:color" minOccurs="0"/> <element ref="kml:bgColor" minOccurs="0"/> </choice> <element ref="kml:textColor" minOccurs="0"/> <element ref="kml:text" minOccurs="0"/> <element ref="kml:displayMode" minOccurs="0"/> <element ref="kml:BalloonStyleSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:BalloonStyleObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="BalloonStyleSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="BalloonStyleObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="ListStyle" type="kml:ListStyleType" substitutionGroup="kml:AbstractSubStyleGroup"/> <complexType name="ListStyleType" final="#all"> <complexContent> <extension base="kml:AbstractSubStyleType"> <sequence> <element ref="kml:listItemType" minOccurs="0"/> <element ref="kml:bgColor" minOccurs="0"/> <element ref="kml:ItemIcon" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:maxSnippetLines" minOccurs="0"/> <element ref="kml:ListStyleSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:ListStyleObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

225

OGC 07-147r2

</complexContent> </complexType> <element name="ListStyleSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="ListStyleObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="ItemIcon" type="kml:ItemIconType" substitutionGroup="kml:AbstractObjectGroup"/> <complexType name="ItemIconType" final="#all"> <complexContent> <extension base="kml:AbstractObjectType"> <sequence> <element ref="kml:state" minOccurs="0"/> <element ref="kml:href" minOccurs="0"/> <element ref="kml:ItemIconSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:ItemIconObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="ItemIconSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="ItemIconObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="TimeStamp" type="kml:TimeStampType" substitutionGroup="kml:AbstractTimePrimitiveGroup"/> <complexType name="TimeStampType" final="#all"> <complexContent> <extension base="kml:AbstractTimePrimitiveType"> <sequence> <element ref="kml:when" minOccurs="0"/> <element ref="kml:TimeStampSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:TimeStampObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="TimeStampSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="TimeStampObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="TimeSpan" type="kml:TimeSpanType" substitutionGroup="kml:AbstractTimePrimitiveGroup"/> <complexType name="TimeSpanType" final="#all"> <complexContent> <extension base="kml:AbstractTimePrimitiveType"> <sequence> <element ref="kml:begin" minOccurs="0"/>

226

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

<element ref="kml:end" minOccurs="0"/> <element ref="kml:TimeSpanSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> <element ref="kml:TimeSpanObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> <element name="TimeSpanSimpleExtensionGroup" abstract="true" type="anySimpleType"/> <element name="TimeSpanObjectExtensionGroup" abstract="true" substitutionGroup="kml:AbstractObjectGroup"/> <element name="Update" type="kml:UpdateType"/> <complexType name="UpdateType" final="#all"> <sequence> <element ref="kml:targetHref"/> <choice maxOccurs="unbounded"> <element ref="kml:Create"/> <element ref="kml:Delete"/> <element ref="kml:Change"/> <element ref="kml:UpdateOpExtensionGroup"/> </choice> <element ref="kml:UpdateExtensionGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> <element name="UpdateOpExtensionGroup" abstract="true"/> <element name="UpdateExtensionGroup" abstract="true"/> <element name="Create" type="kml:CreateType"/> <complexType name="CreateType"> <sequence> <element ref="kml:AbstractContainerGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> <element name="Delete" type="kml:DeleteType"/> <complexType name="DeleteType"> <sequence> <element ref="kml:AbstractFeatureGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> <element name="Change" type="kml:ChangeType"/> <complexType name="ChangeType"> <sequence> <element ref="kml:AbstractObjectGroup" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

227

OGC 07-147r2

</schema>

228

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

Atom schema (atom-author-link.xsd) <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.w3.org/2005/Atom" xmlns:atom="http://www.w3.org/2005/Atom" version="1.0.0"> <annotation> <appinfo>atom-author-link.xsd 2008-01-23</appinfo> <documentation>There is no official atom XSD. This XSD is created based on: http://atompub.org/2005/08/17/atom.rnc. A subset of Atom as used in the ogckml22.xsd is defined here.</documentation> </annotation> <!-- Person Construct --> <complexType name="atomPersonConstruct"> <choice minOccurs="0" maxOccurs="unbounded"> <element ref="atom:name"/> <element ref="atom:uri"/> <element ref="atom:email"/> </choice> </complexType> <element name="name" type="string"/> <element name="uri" type="string"/> <element name="email" type="atom:atomEmailAddress"/> <!-- atom:author --> <element name="author" type="atom:atomPersonConstruct"/> <!-- atom:link --> <element name="link"> <complexType> <attribute name="href" use="required"/> <attribute name="rel"/> <attribute name="type" type="atom:atomMediaType"/> <attribute name="hreflang" type="atom:atomLanguageTag"/> <attribute name="title"/> <attribute name="length"/> </complexType> </element> <!-- Whatever a media type is, it contains at least one slash --> <simpleType name="atomMediaType"> <restriction base="string"> <pattern value=".+/.+"/> </restriction> </simpleType> <!-- As defined in RFC 3066 --> <simpleType name="atomLanguageTag">

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

229

OGC 07-147r2

<restriction base="string"> <pattern value="[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*"/> </restriction> </simpleType> <!-- Whatever an email address is, it contains at least one @ --> <simpleType name="atomEmailAddress"> <restriction base="string"> <pattern value=".+@.+"/> </restriction> </simpleType> </schema>

230

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

Annex B (normative) KML Coordinate Reference System Definition

<CompoundCRS gml:id="LonLat84_5773" xmlns="http://www.opengis.net/gml/3.2" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xlink="http://www.w3.org/1999/xlink" aggregationType="sequence"> <identifier codeSpace="http://www.opengeospatial.org/ogcna"> urn:ogc:def:crs:OGC:LonLat84_5773 </identifier> <name>Geographic 3D: Long(deg),Lat(deg),Height(m)</name> <scope>KML 3D coordinate reference system</scope> <componentReferenceSystem> <GeodeticCRS gml:id="LonLat84"> <identifier codeSpace="http://www.opengeospatial.org/ogcna"> urn:ogc:def:crs:OGC:LonLat84 </identifier> <name>WGS 84 with long/lat axis order</name> <scope>KML geographic 2D coordinate reference system (adapted from EPSG-4326).</scope> <usesEllipsoidalCS> <EllipsoidalCS gml:id="LonLatEllipsoidalCS"> <identifier codeSpace="http://www.opengeospatial.org/ogcna"> urn:ogc:def:cs:OGC:LonLatEllipsoidalCS </identifier> <name>Ellipsoidal 2D CS. Axes: longitude, latitude. Orientations: east, north. UoM: deg</name> <scope>Adapted from EPSG-6422, with axis order reversed.</scope> <axis> <CoordinateSystemAxis gml:id="Long" uom="deg"> <identifier codeSpace="http://www.opengeospatial.org/ogcna"> urn:ogc:def:axis:OGC:Long </identifier> <axisAbbrev>Long</axisAbbrev> <axisDirection codeSpace="http://www.epsg.org/guides/docs/G7-1.pdf">east</axisDirection> </CoordinateSystemAxis> </axis> <axis> <CoordinateSystemAxis gml:id="Lat" uom="deg"> <identifier codeSpace="http://www.opengeospatial.org/ogcna"> urn:ogc:def:axis:OGC:Lat </identifier> <axisAbbrev>Lat</axisAbbrev>

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

231

OGC 07-147r2

<axisDirection codeSpace="http://www.epsg.org/guides/docs/G7-1.pdf">north</axisDirection> </CoordinateSystemAxis> </axis> </EllipsoidalCS> </usesEllipsoidalCS> <usesGeodeticDatum xlink:href="urn:ogc:def:datum:EPSG:6326" xlink:title="World Geodetic System 1984" xlink:role="http://earthinfo.nga.mil/GandG/publications/tr8350.2/tr8350_2.html"/> </GeodeticCRS> </componentReferenceSystem> <componentReferenceSystem> <VerticalCRS gml:id="EPSG-5773"> <identifier codeSpace="http://www.opengeospatial.org/ogcna"> urn:ogc:def:crs:EPSG:5773 </identifier> <name>EGM96 geoid</name> <remarks>Height surface resulting from the application of the EGM96 geoid model to the WGS 84 ellipsoid.</remarks> <scope>Geodesy</scope> <verticalCS xlink:href="urn:ogc:def:cs:EPSG:6499" xlink:title="Gravity-related CS. Axis: height (H). Orientation: up. UoM: m."/> <verticalDatum xlink:href="urn:ogc:def:datum:EPSG:5171" xlink:title="EGM96 geoid" xlink:role="http://cddis.gsfc.nasa.gov/926/egm96/egm96.html"/> </VerticalCRS> </componentReferenceSystem> </CompoundCRS>

232

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

OGC 07-147r2

Bibliography

Google Inc., KML 2.2 Reference Document, 2007 http://code.google.com/apis/kml/documentation/kml_tags_beta1.html IETF RFC 2616, Hypertext Transfer Protocol – HTTP/1.1. (June 1999) IETF RFC 2806, URLs for Telephone Calls. (April 2000) ISO 8601:2004, Data elements and interchange formats — Information interchange — Representation of dates and times. ISO 19101:2002. Geographic information -- Reference model ISO 19107:2003, Geographic Information — Spatial schema. ISO 19111:—1), Geographic Information — Spatial referencing by coordinates. ISO 19136:2007, Geographic information — Geography Markup Language (GML) OGC 00-014r1, Guidelines for Successful OGC Interface Specifications.

Copyright © 2007, 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

233

Related documents

Record · ID 601118 · SHA-256 fcad423c7700c13e
Conceptio Open Knowledge Archive — every document is proof-bundled with source, license, and retrieval metadata.