OGC KML 2.2 – Abstract Test Suite

Authors

B. Hagemark

R. Martell

Editor
Galdos Systems, Inc.
<rmartell {AT} galdosinc {DOT} com>

J. Parr-Pearson

T. Wilson

Galdos Systems, Inc.
<twilson {AT} galdosinc {DOT} com>

Copyright (c) 2008 Open Geospatial Consortium, Inc. All Rights Reserved.

Revision History

Revision 1.0.0

2008-04-11

Corresponds to the final approved OGC specification; includes minor editorial revisions in the wake of the 60-day TC review.

Revision 1.0.0-rc2

2008-01-21

Updated to address public review comments (see OGC 08-004); minor editorial revisions.

Revision 1.0.0-rc1

2007-11-05

Overview

This document is an abstract test suite (ATS): a compendium of abstract test cases that provide a basis for verifying the structure and content of OGC KML 2.2 instance documents. Three conformance levels are defined; each level builds on the preceding ones:

  • Level 1 - includes test cases covering all requirements to be satisfied by a minimally conformant KML document;

  • Level 2 - as for Level 1, plus test cases addressing recommended requirements;

  • Level 3 - as for Level 2, plus test cases covering suggested constraints that are informative in nature.

Note that the prefix "kml" in this document designates the KML 2.2 namespace having the name "http://www.opengis.net/kml/2.2".

Source documents

Table of Contents

Conformance Level 1

Purpose

Conformance Level 1 includes test cases corresponding to absolute requirements; a KML document must satisfy all assertions at this level to be minimally conformant.

List of Tables

ATC 1: Root element

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/RootElement

Test purpose

Verify that the root element of the document has [local name] = "kml" and [namespace name] = "http://www.opengis.net/kml/2.2".

Test method

Pass if all assertions are satisfied; fail otherwise. This test checks that the XML document is indeed an OGC KML document. If this test fails, all remaining tests are skipped.

Reference

  • OGC-07-147r2: cl. 7.1.2

Test type

Basic

ATC 2: XML Schema constraints

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/XmlSchemaConstraints

Test purpose

Check that the document is well-formed and schema-valid.

Test method

Pass if the document satisfies all schema constraints; fail otherwise.

Reference

Test type

Basic

ATC 3: Geometry coordinates

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/Geometry-Coordinates

Test purpose

Verify that a kml:coordinates element contains a list of white space-separated 2D or 3D tuples that contain comma-separated decimal values (lon,lat[,hgt]).

Test method

Pass if all kml:coordinates elements contain 2D/3D tuples containing decimal values conforming to the xsd:decimal type; fail otherwise. White space consists of one or more of the following characters: space (U+0020), carriage return (U+000D), line feed (U+000A), or tab (U+0009). The relevant coordinate reference system (CRS) is defined in Annex B of the OGC KML 2.2 specification.

Reference

Test type

Basic

ATC 4: TimeSpan

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/TimeSpan

Test purpose

Verify that a TimeSpan element satisfies all of the following constraints:

  1. it includes at least one child element (kml:begin or kml:end);

  2. if it is a definite interval (both kml:begin and kml:end are present), then the begin value is earlier than the end value.

Test method

Pass if all assertions are satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 15.2.2

Test type

Basic

ATC 5: TimeStamp

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/TimeStamp

Test purpose

Verify that a kml:TimeStamp element has a child kml:when element.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 15.3.2

Test type

Basic

ATC 6: Style reference

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/StyleReference

Test purpose

Check that a kml:styleUrl element satisfies all of the following constraints:

  1. its value is a valid relative or absolute URL that refers to a shared style definition (any element that substitutes for [.emphasis]# kml:AbstractStyleSelectorGroup #);

  2. if the reference is an absolute URI, the value conforms to the 'http' or 'file' URI schemes;

  3. it includes a fragment identifier conforming to the shorthand pointer syntax as defined in the W3C XPointer framework.

Test method

Pass if all applicable assertions are satisfied; fail otherwise. A relative URL is resolved according to the reference resolution algorithm described in section 5 of RFC 3986.

Reference

Test type

Basic

ATC 7: Shared style definition

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/SharedStyle

Test purpose

Confirm that a 'shared' style definition (any element that may substitute for [.emphasis]# kml:AbstractStyleSelectorGroup #) satisfies all of the following constraints:

  • its parent element is kml:Document;

  • it has an 'id' attribute value.

Test method

Pass if all assertions are satisfied; fail otherwise. Shared styles include kml:Style and kml:StyleMap elements.

Reference

  • OGC-07-147r2: cl. 6.4

Test type

Basic

ATC 8: Region - LatLonAltBox

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/Region-LatLonAltBox

Test purpose

Verify that the content of a kml:LatLonAltBox element satisfies all of the following constraints:

  1. kml:north > kml:south;

  2. kml:east > kml:west;

  3. kml:minAltitude ⇐ kml:maxAltitude;

  4. if kml:minAltitude and kml:maxAltitude are both present, then kml:altitudeMode does [.strong]# not # have the value "clampToGround".

Test method

Pass if all applicable assertions are satisfied; fail otherwise. The default envelope for a region of interest is the entire surface of the EGM96 geoid. By testing north > south and east > west, we are testing for a non-zero area.

Reference

  • OGC-07-147r2: cl. 9.15.2

Test type

Basic

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/Link-Elements

Test purpose

Check that a link element (of type kml:LinkType) satisfies all of the following constraints:

  1. if present, the child kml:refreshInterval element has a positive value (> 0);

  2. if present, the child kml:viewRefreshTime element has a positive value (> 0);

  3. if present, the child kml:viewBoundScale element has a positive value (> 0).

Test method

Pass if a link element (kml:Link, [.emphasis]# kml:AbstractOverlayType #/kml:Icon) satisfies all applicable constraints; fail otherwise.

Reference

  • OGC-07-147r2: cl. 13.1.3.3.1

  • OGC-07-147r2: cl. 13.1.3.5.1

  • OGC-07-147r2: cl. 13.1.3.6.1

Test type

Basic

ATC 10: Link referent

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/LinkReferent

Test purpose

Confirm that a link element refers to the correct resource type, according to one of the following cases:

  1. if the parent element is kml:NetworkLink - a KML or KMZ resource;

  2. if the parent element is kml:Model - a textured 3D object resource;

  3. if the parent element is kml:GroundOverlay, kml:ScreenOverlay, or kml:PhotoOverlay - an image resource

Test method

Pass if all link elements (kml:Link, [.emphasis]# kml:AbstractOverlayType #/kml:Icon) have correct referents; fail otherwise.

Reference

  • OGC-07-147r2: cl. 9.12.3.3

  • OGC-07-147r2: cl. 10.9.3.5.1

  • OGC-07-147r2: cl. 11.1.3.3

Test type

Basic

ATC 11: LatLonBox

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/LatLonBox

Test purpose

Verify that a kml:LatLonBox element satisfies all of the following constraints:

  1. it contains the kml:north, kml:south, kml:east, and kml:west elements;

  2. kml:north > kml:south (compare character information items);

  3. kml:east > kml:west (compare character information items).

Test method

Pass if the assertion is satisfied; fail otherwise. The default envelope for a kml:GroundOverlay is the entire surface of the WGS 84 ellipsoid. By testing north > south and east > west, we are testing for a non-zero area.

Reference

  • OGC-07-147r2: cl. 11.3.2

Test type

Basic

ATC 12: Geometry - extrude

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/Geometry-Extrude

Test purpose

Check that if the kml:extrude element has the value "true", then the value of kml:altitudeMode is [.strong]# not # "clampToGround".

Test method

Pass if the assertion is satisfied; fail otherwise. This applies to the following elements: kml:Point, kml:LineString, kml:LinearRing (but NOT if it occurs within a Polygon), and kml:Polygon.

Reference

  • OGC-07-147r2: cl. 10.4.1.1.2

Test type

Basic

ATC 13: Geometry - tessellate

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/Geometry-Tessellate

Test purpose

Confirm that if the kml:tessellate element has the value "true", then the value of kml:altitudeMode is "clampToGround" (default value).

Test method

Pass if the assertion is satisfied; fail otherwise. This applies to the following elements: kml:LineString, kml:LinearRing (but NOT if it occurs within a Polygon), and kml:Polygon.

Reference

  • OGC-07-147r2: cl. 10.6.2

Test type

Basic

ATC 14: Point

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/Point

Test purpose

Check that the kml:coordinates element in a kml:Point geometry contains exactly one coordinate tuple.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 10.3.2

Test type

Basic

ATC 15: LineString

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/LineString

Test purpose

Verify that the kml:coordinates element in a kml:LineString geometry contains at least two coordinate tuples.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 10.7.3.4.1

Test type

Basic

ATC 16: LinearRing - control points

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/LinearRing-ControlPoints

Test purpose

Check that the kml:coordinates element in a kml:LinearRing geometry contains at least 4 coordinate tuples, where the first and last are identical (i.e. they constitute a closed figure).

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 10.7.5.4.1

Test type

Basic

ATC 17: Polygon boundary

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/PolygonBoundary

Test purpose

Verify that the boundary of a kml:Polygon element satisfies all of the following constraints:

  1. if it is [.strong]# not # a descendant of kml:Update, then the kml:Polygon has a child kml:outerBoundaryIs element;

  2. each interior boundary defines a hole in the Polygon (that is, each inner ring lies within the exterior boundary).

Test method

Pass if all assertions are satisfied; fail otherwise. This test case reflects the essential definition of a polygon; no particular line orientations are assumed. The relevant polygons can be identified using this XPath expression: //kml:Polygon[not(ancestor::kml:Update)].

Reference

  • OGC-07-147r2: cl. 10.8.2

Test type

Basic

ATC 18: Icon - href

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/Icon-href

Test purpose

Verify that the kml:Icon/kml:href element refers to an image resource.

Test method

Pass if the assertion is satisfied; fail otherwise. The image format must correspond to a registered image media type (PNG, JPEG, and GIF images are commonly used for this purpose). Applies to kml:Icon elements in both kml:IconStyle and [.emphasis]# kml:AbstractOverlayType # contexts.

Reference

Test type

Basic

ATC 19: ViewVolume - minimal content

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/ViewVolume-Minimal

Test purpose

Verify that a kml:ViewVolume element includes at least the following child elements: kml:leftFov, kml:rightFov, kml:bottomFov, kml:topFov, and kml:near (non-negative value).

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 11.5.2

  • OGC-07-147r2: cl. 11.5.3.5

Test type

Basic

ATC 20: NetworkLinkControl - minRefreshPeriod

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/NetworkLinkControl-MinRefreshPeriod

Test purpose

Verify that a kml:minRefreshPeriod element (occurs in kml:NetworkLinkControl) is non-negative (>=0).

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 13.2.3.1.1

Test type

Basic

ATC 21: Empty object

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/EmptyObject

Test purpose

Verify that a KML object that is [.strong]# not # a descendant of kml:Update is either (a) not empty, or (b) has an 'id' attribute value (so it can be easily updated).

Test method

Pass if the assertion is satisfied; fail otherwise. The relevant context is //[.emphasis]# kml:AbstractObjectType #[not(ancestor::kml:Update)].

Reference

  • OGC-07-147r2: cl. 8.1.3.1.1

Test type

Basic

ATC 22: Update - targetHref

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/Update-targetHref

Test purpose

Check that the value of the kml:Update/kml:targetHref element satisfies all of the following constraints:

  1. it is an absolute URL that refers to a KML or KMZ resource;

  2. the value matches the retrieval URI for an existing NetworkLink element (kml:NetworkLink/kml:Link/kml:href).

Test method

Pass if all applicable assertions are satisfied; fail otherwise. This modifies the behaviour of a referring NetworkLink.

Reference

  • OGC-07-147r2: cl. 13.4.2

Test type

Basic

ATC 23: Identification of update target

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/UpdateTarget

Test purpose

Check that a KML object which is a grandchild of kml:Update satisfies the following constraints: (a) it includes a 'targetId' attribute value that identifies the object to be updated, and (b) it does not have an 'id' attribute.

Test method

Pass if the assertion is satisfied; fail otherwise. Examine the content of all kml:Create, kml:Delete and kml:Change elements.

Reference

  • OGC-07-147r2: cl. 13.3.2

Test type

Basic

ATC 24: PhoneNumber

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/PhoneNumber

Test purpose

Check that the value of the kml:phoneNumber element is a 'tel' URI that conforms to RFC 3966.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

Test type

Basic

ATC 25: Schema

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/Schema

Test purpose

Check that a kml:Schema element has an 'id' attribute value.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 9.8.2

Test type

Basic

ATC 26: Schema - SimpleField

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/Schema-SimpleField

Test purpose

Verify that a kml:SimpleField element satisfies all of the following constraints:

  1. it has a 'name' attribute;

  2. the value of the 'type' attribute is one of the following XML Schema data types:

    • xsd:string

    • xsd:int

    • xsd:unsignedInt

    • xsd:short

    • xsd:unsignedShort

    • xsd:float

    • xsd:double

    • xsd:boolean

Test method

Pass if all assertions are satisfied; fail otherwise.

Reference

Test type

Basic

ATC 27: ExtendedData - SchemaData

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/ExtendedData-SchemaData

Test purpose

Confirm that a kml:SchemaData element satisfies all of the following constraints:

  1. the 'schemaUrl' attribute value is a URL with a fragment component that refers to a kml:Schema element;

  2. all kml:SimpleData child elements have a 'name' attribute that matches the name of a declared kml:SimpleField element in the corresponding Schema;

  3. the values of all kml:SimpleData child elements conform to their declared types.

Test method

Pass if all assertions are satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 9.4.2

  • OGC-07-147r2: cl. 9.5.2

Test type

Basic

ATC 28: ExtendedData - Data

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/ExtendedData-Data

Test purpose

Check that the value of the 'name' attribute is unique within the context of the parent kml:ExtendedData element.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 9.3.2

Test type

Basic

ATC 29: Alias

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/Alias

Test purpose

Verify that a kml:Alias element satisfies the following assertions:

  1. the value of the child kml:targetHref element is a URI reference to an image (texture) resource;

  2. the value of the child kml:sourceHref element corresponds to a file reference appearing within the 3D object resource referenced in the preceding sibling kml:Link element.

Test method

Pass if all assertions are satisfied; fail otherwise. The source is expected to be a textual (possibly XML) resource.

Reference

  • OGC-07-147r2: cl. 10.14.3.1.1

Test type

Basic

ATC 30: atom:author

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/atom-author

Test purpose

Check that an atom:author element satisfies all of the following assertions:

  1. the content of the child atom:uri element is an IRI reference;

  2. the content of the child atom:email element conforms to the "addr-spec" production in RFC 2822.

Test method

Pass if all assertions are satisfied; fail otherwise.

Reference

Test type

Basic

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/atom-link

Test purpose

Check that the value of the atom:link/@rel attribute is "related".

Test method

Pass if the assertion is satisfied; fail otherwise. If the attribute is not present, the link must be interpreted as if @rel = "alternate" (i.e. the referent is an alternate version of the resource). The value "related" simply signifies a generic relationship.

Reference

Test type

Basic

ATC 32: Orientation - minimal content

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/Orientation-Minimum

Test purpose

Verify that if a kml:Orientation element is not a descendant of kml:Update, then it contains at least one of the following elements: kml:heading, kml:tilt, or kml:roll.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 10.11.2

Test type

Basic

ATC 33: GroundOverlay

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/GroundOverlay

Test purpose

Verify that a kml:GroundOverlay with an kml:altitudeMode value of "absolute" includes a kml:altitude element.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 9.17.2

Test type

Basic

ATC 34: Model

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/Model

Test purpose

Check that a kml:Model element satisfies all of the following constraints:

  1. it contains the kml:Link and kml:Location elements;

  2. if it is not a descendant of kml:Update and the target resource refers to any texture files, then there must be a kml:ResourceMap/kml:Alias for each related texture file.

Test method

Pass if all applicable assertions are satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 10.9.3

Test type

Basic

ATC 35: PhotoOverlay - minimal content

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/PhotoOverlay-Minimal

Test purpose

Check that if a kml:PhotoOverlay element is not a descendant of kml:Update, then it includes all of the following child elements: kml:Icon, kml:ViewVolume, kml:Point, and kml:Camera.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 11.4.2

Test type

Basic

ATC 36: Pair

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/Pair

Test purpose

Check that if a kml:Pair element is not a descendant of kml:Update, then it contains (a) a kml:key element, and (b) at least one of kml:styleURL element or any element that substitutes for [.emphasis]# kml:AbstractStyleSelectorGroup #.

Test method

Pass if the assertion is satisfied; fail otherwise. [.emphasis]# kml:AbstractStyleSelectorGroup # elements are typically kml:Style or kml:StyleMap.

Reference

  • OGC-07-147r2: cl. 12.4.2

Test type

Basic

ATC 37: ItemIcon

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/ItemIcon

Test purpose

Check that if a kml:ItemIcon element is not a descendant of kml:Update, then it has a kml:href child element.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 12.14.2

Test type

Basic

ATC 38: LookAt

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/LookAt

Test purpose

Check that a kml:LookAt element satisfies all of the following constraints:

  1. if it is not a descendant of kml:Update, it contains all of the following child elements: kml:longitude, kml:latitude, and kml:range;

  2. 0 ⇐ kml:tilt ⇐ 90;

  3. if kml:altitudeMode does not have the value "clampToGround", then the kml:altitude element is present.

Test method

Pass if the applicable assertions are satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 9.17.2

  • OGC-07-147r2: cl. 14.3.2

  • OGC-07-147r2: cl. 14.3.4.5.1

Test type

Basic

ATC 39: Lod

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/Lod

Test purpose

Check that a kml:Lod element satisfies all of the following constraints:

  1. if it is not a descendant of kml:Update, it contains the kml:minLodPixels element;

  2. kml:minLodPixels < kml:maxLodPixels (where a value of -1 denotes infinity).

Test method

Pass if all assertions are satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 9.18.2

Test type

Basic

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/Link

Test purpose

Check that if a kml:Link or a kml:Icon element is not a descendant of kml:Update, then it contains a kml:href child element.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 13.1.2

Test type

Basic

ATC 41: Region

Identifier

http://www.opengis.net/kml/2.2/atc/level-1/Region

Test purpose

Confirm that if a kml:Region element is not a descendant of kml:Update, it contains the kml:LatLonAltBox and kml:Lod elements.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 9.13.2

Test type

Basic

Conformance Level 2

Purpose

Conformance Level 2 includes all Level 1 tests plus test cases covering requirements that should be satisfied by a KML document. Non-conformance at this level may hinder the utility, portability, or interoperability of the document.

List of Tables

ATC 42: PolyStyle

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/PolyStyle

Test purpose

Check that if a kml:PolyStyle element is not a descendant of kml:Update, it contains at least one of the following elements: kml:color, kml:colorMode, kml:fill, or kml:outline.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 12.12.2

Test type

Basic

ATC 43: Coordinates - altitudeMode

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/Coordinates-altitudeMode

Test purpose

Confirm that a kml:coordinates or kml:Location element includes a third coordinate tuple (altitude) if its sibling kml:altitudeMode element does NOT have the value "clampToGround".

Test method

Pass if the assertion is satisfied; fail otherwise. Applies to the control points in [.emphasis]# kml:AbstractGeometryType #/kml:coordinates and kml:Model/kml:Location.

Reference

  • OGC-07-147r2: cl. 9.17.2

Test type

Basic

ATC 44: Scale - minimal content

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/Scale-Minimal

Test purpose

Verify that if a kml:Scale element is not a descendant of kml:Update, it contains at least one of the following elements: kml:x, kml:y, or kml:z.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 10.12.2

Test type

Basic

ATC 45: KML - minimal content

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/Kml-Minimal

Test purpose

Verify that the root element (kml:kml) contains at least one child element: kml:NetworkLinkControl or any element that substitutes for [.emphasis]# kml:AbstractFeatureType #.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 7.1.2

Test type

Basic

ATC 46: ViewFormat

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/ViewFormat

Test purpose

Verify a kml:viewFormat contains at least one parameter.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 13.1.2

Test type

Basic

ATC 47: httpQuery

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/HttpQuery

Test purpose

Verify a kml:httpQuery contains at least one parameter.

Test method

Pass if the httpQuery has at least one of the allowable parameters; fail otherwise.

Reference

  • OGC-07-147r2: cl. 13.1.2

Test type

Basic

ATC 48: LinearRing in Polygon

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/LinearRingInPolygon

Test purpose

Verify that a kml:LinearRing element, when appearing within a kml:Polygon, does not contain any of the following elements: kml:extrude, kml:tesselate, or kml:altitudeMode.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 10.5.2

Test type

Basic

ATC 49: Data

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/Data

Test purpose

Check that the kml:Data element has both a 'name' attribute and a kml:value child element.

Test method

Pass if the assertion is satisfiedt; fail otherwise.

Reference

  • OGC-07-147r2: cl. 9.3.2

Test type

Basic

ATC 50: ResourceMap - Alias

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/ResourceMap-Alias

Test purpose

Verify that a kml:ResourceMap element contains at least one kml:Alias child element, and that each Alias element has a unique kml:sourceHref value.

Test method

Pass if all assertions are satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 10.13.2

Test type

Basic

ATC 51: Link refresh values

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/LinkRefresh

Test purpose

Check that a kml:Link or a kml:Icon element (of type kml:LinkType) satisfies all of the following constraints:

  1. if the kml:refreshInterval element is present, the kml:refreshMode value must be "onInterval";

  2. if the kml:viewRefresh element is present, the kml:refreshMode value must be "onStop".

Test method

Pass if all relevant assertions are satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 13.1.3.2.1

Test type

Basic

ATC 52: PhotoOverlay

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/PhotoOverlay

Test purpose

Check that if a kml:PhotoOverlay element includes a kml:Icon/kml:href element containing [x], [y], and [level] parameters, then it also includes a child kml:ImagePyramid element; the converse must also be true.

Test method

Pass if the assertion is satisfied; fail otherwise. The parameters are embedded within the URL; i.e, level/row_$column$[y].jpg. Check for the kml:ImagePyramid when the x, y, level parameters are present, or if the kml:ImagePyramid is present check for the x, y, level parameters.

Reference

  • OGC-07-147r2: cl. 11.4.3

Test type

Basic

ATC 53: GroundOverlay - minimal content

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/GroundOverlay-Minimal

Test purpose

Verify that if a kml:GroundOverlay element is not a descendant of kml:Update, it contains a kml:LatLonBox element (with kml:north, kml:south, kml:east, kml:west).

Test method

Pass if the assertion is satisfied; fail otherwise. The presence of north, south, east, and west indicates the Overlay draws a polygon.

Reference

  • OGC-07-147r2: cl. 11.2.3.1

Test type

Basic

ATC 54: Camera

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/Camera

Test purpose

Check that a kml:Camera element satisfies all of the following constraints:

  1. if it is not a descendant of kml:Update, then the following child elements are present: kml:latitude, kml:longitude, and kml:altitude;

  2. the value of kml:altitudeMode is not "clampToGround".

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 14.2.2

Test type

Basic

ATC 55: Location

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/Location

Test purpose

Check that a kml:Location element satisfies all of the following constraints:

  1. it contains the kml:longitude and kml:latitude elements;

  2. if the parent kml:Model element has a kml:altitudeMode value that is not "clampToGround", then the kml:altitude element must also be present.

Test method

Pass if all applicable assertions are satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 9.17.2

  • OGC-07-147r2: cl. 10.9.2,

  • OGC-07-147r2: cl. 10.10.2

Test type

Basic

ATC 56: Overlay

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/Overlay

Test purpose

Check that if any element that substitutes for [.emphasis]# kml:AbstractOverlayType # is not a descendant of kml:Update, then it contains a kml:Icon child element.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 11.2.2

Test type

Basic

ATC 57: ScreenOverlay

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/ScreenOverlay

Test purpose

Check that if a kml:ScreenOverlay element is not a descendant of kml:Update, then it has a kml:screenXY child element.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 11.7.2

Test type

Basic

ATC 58: BalloonStyle

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/BalloonStyle

Test purpose

Check that if a kml:BalloonStyle element is not a descendant of kml:Update, it is not empty.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 12.6.2

Test type

Basic

ATC 59: ExtendedData

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/ExtendedData

Test purpose

Check that a kml:ExtendedData element is not empty.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 9.2.2

Test type

Basic

ATC 60: Folder

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/Folder

Test purpose

Check that if a kml:Folder element is not a descendant of kml:Update, then it is not empty.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 9.10.2

Test type

Basic

ATC 61: IconStyle

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/IconStyle

Test purpose

Check that if a kml:IconStyle element is NOT a descendant of kml:Update, it is not empty.

Test method

Pass if all applicable assertions are satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 12.8.2

  • OGC-07-147r2: cl. 12.9.2

Test type

Basic

ATC 62: ImagePyramid

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/ImagePyramid

Test purpose

Check that if a kml:ImagePyramid element is not a descendantof kml:Update, it satisfies all of the following constraints:

  1. it has the kml:maxWidth and kml:maxHeight child elements;

  2. the kml:tileSize value is a power of 2.

Test method

Pass if all assertions are satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 11.6.2

Test type

Basic

ATC 63: LabelStyle

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/LabelStyle

Test purpose

Check that if a kml:LabelStyle element is not a descendant of kml:Update, it has at least one of the following child elements: kml:color, kml:colorMode, or kml:scale.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 12.10.2

Test type

Basic

ATC 64: ListStyle

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/ListStyle

Test purpose

Check that if a kml:ListStyle element is not a descendant of kml:Update, it has at least one of the following child elements: kml:listItemType, kml:bgColor, or kml:ItemIcon.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 12.13.2

Test type

Basic

ATC 65: Style

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/Style

Test purpose

Check that if a kml:Style element is not a descendant of kml:Update, it is not empty.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 12.2.2

Test type

Basic

ATC 66: MultiGeometry

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/MultiGeometry

Test purpose

Check that if a kml:MultiGeometry element is not a descendant of kml:Update, it contains two or more geometry elements.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 10.2.2

Test type

Basic

ATC 67: Placemark

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/Placemark

Test purpose

Check that if a kml:Placemark element is not a descendant of kml:Update, it includes a geometry element (any element that substitutes for [.emphasis]# kml:AbstractGeometryGroup #.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 9.11.2

Test type

Basic

ATC 68: StyleMap

Identifier

http://www.opengis.net/kml/2.2/atc/level-2/StyleMap

Test purpose

Check that if a kml:StyleMap element is not a descendant of kml:Update, it contains two kml:Pair elements where one key value is "normal" and the other key value is "highlight".

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 12.3.2

Test type

Basic

Conformance Level 3

Purpose

Conformance Level 3 includes all Level 2 tests and introduces additional constraints of an informative nature; these are intended to signal the use of deprecated elements or to encourage alignment with existing (non-normative) standards or conventions.

List of Tables

ATC 69: Polygon - rings

Identifier

http://www.opengis.net/kml/2.2/atc/level-3/PolygonRings

Test purpose

Confirm that no two rings comprising the boundary of a kml:Polygon geometry cross.

Test method

Pass if the assertion is satisfied; fail otherwise. The rings may intersect at a single point.

Reference

Test type

Basic

ATC 70: LinearRing - Simple

Identifier

http://www.opengis.net/kml/2.2/atc/level-3/SimpleLinearRing

Test purpose

Check that a kml:LinearRing is a simple ring (that is, it does not cross itself).

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

Test type

Basic

ATC 71: BalloonStyle - color

Identifier

http://www.opengis.net/kml/2.2/atc/level-3/BalloonStyle-color

Test purpose

Check for any occurrences of the (deprecated) kml:color element in kml:BalloonStyle elements.

Test method

Pass if no kml:color elements occur in this context; fail otherwise. This element is deprecated in favour of kml:bgColor.

Reference

  • OGC-07-147r2: Annex A

Test type

Basic

ATC 72: Metadata

Identifier

http://www.opengis.net/kml/2.2/atc/level-3/Metadata

Test purpose

Check for any occurrences of the (deprecated) kml:Metadata element.

Test method

Pass if no kml:Metadata elements occur; fail otherwise. This element is deprecated in favour of kml:ExtendedData.

Reference

  • OGC-07-147r2: Annex A

Test type

Basic

ATC 73: Scale - full content

Identifier

http://www.opengis.net/kml/2.2/atc/level-3/Scale-Full

Test purpose

Verify that a kml:Scale element includes all of the following child elements: kml:x, kml:y, and kml:z.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 10.12.2

Test type

Basic

ATC 74: Lod - fade extents

Identifier

http://www.opengis.net/kml/2.2/atc/level-3/Lod-FadeExtents

Test purpose

Verify the following constraint regarding the evaluation of fade extents: kml:minFadeExtent + kml:maxFadeExtent ⇐ kml:maxLodPixels - kml:minLodPixels.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 9.18.2

Test type

Basic

ATC 75: Orientation - full content

Identifier

http://www.opengis.net/kml/2.2/atc/level-3/Orientation-Full

Test purpose

Verify that a kml:Orientation element includes the following child elements: kml:heading, kml:tilt, and kml:roll.

Test method

Pass if the assertion is satisfied; fail otherwise.

Reference

  • OGC-07-147r2: cl. 10.11.2

Test type

Basic

ATC 76: Snippet

Identifier

http://www.opengis.net/kml/2.2/atc/level-3/Snippet

Test purpose

Check for any occurrences of the (deprecated) kml:Snippet element.

Test method

Pass if no kml:Snippet elements occur; fail otherwise. This element is deprecated in favour of kml:snippet.

Reference

  • OGC-07-147r2: Annex A

Test type

Basic

Identifier

http://www.opengis.net/kml/2.2/atc/level-3/NetworkLink/Url

Test purpose

Check for any occurrences of the (deprecated) kml:Url element.

Test method

Pass if no kml:Url elements occur as a child of kml:NetworkLink; fail otherwise. This element is deprecated in favour of kml:Link.

Reference

  • OGC-07-147r2: Annex A

Test type

Basic