<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?>
<?rfc toc="yes"?>
<?rfc compact="no"?>
<?rfc subcompact="no"?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no"?>
<?rfc strict="yes"?>
<rfc ipr="trust200902"
     category="std"
     docName="draft-chopps-netmod-geo-location-00"     submissionType="IETF"
    consensus="true"    tocInclude="true"    version="3">
  <front>
    <title abbrev="YANG Geo Location">YANG Geo Location</title>
<author initials='C.' surname='Hopps' fullname='Christian Hopps'><organization>LabN Consulting, L.L.C.</organization><address><email>chopps@chopps.org</email></address></author>  <date/><abstract><t>This document defines a generic geographical location object YANG
grouping. The geographical location grouping is intended to be used
in YANG models for specifying a location on or in reference to the
Earth or any other astronomical object.</t></abstract>  </front>  <middle>

<section title="Introduction">
<t>In many applications we would like to specify the location of
something geographically. Some examples of locations in networking
might be the location of data center, a rack in an internet exchange
point, a router, a firewall, a port on some device, or it could be
the endpoints of a fiber, or perhaps the failure point along a fiber.</t>

<t>Additionally, while this location is typically relative to The Earth,
it does not need to be. Indeed it is easy to imagine a network or
device located on The Moon, on Mars, on Enceladus (the moon of
Saturn) or even a comet (e.g., 67p/churyumov-gerasimenko).</t>

<t>Finally, one can imagine defining locations using a different frames
of reference or even alternate systems (e.g., a simulations or
virtual realities).</t>

<t>This document defines a <tt>geo-location</tt> YANG grouping that allows for
all of the above data to be captured.</t>

<t>This specification conforms to <xref target="ISO.6709.2008"/>.</t>

<t>The YANG data model described in this document conforms to the
Network Management Datastore Architecture defined in <xref target="RFC8342"/>.</t>

<section title="Terminology">
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
<xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals,
as shown here.</t>

</section>

</section>

<section title="The Geo Location Object">
<section title="Frame of Reference" anchor="org9ec810e">
<t>The frame of reference (<tt>reference-frame</tt>) defines what the
location values refer to and their meaning. The referred to
object can be any astronomical body. It could be a planet such as
The Earth or Mars, a moon such as Enceladus, an asteroid such as
Ceres, or even a comet such as 1P/Halley. This value is specified
in <tt>astronomical-body</tt> and is defined by the International
Astronomical Union (<eref target="http://www.iau.org"/>), The default
<tt>astronomical-body</tt> value is <tt>earth</tt>.</t>

<t>In addition to identifying the astronomical body we also need to
define the meaning of the coordinates (e.g., latitude and
longitude) and the definition of 0-height. This is done with a
<tt>geodetic-datum</tt> value. The default value for <tt>geodetic-datum</tt> is
<tt>wgs-84</tt> (i.e., the World Geodetic System, <xref target="WGS84"/>), which is used
by the Global Positioning System (GPS) among many others. We
define an IANA registry for specifying standard values for the
<tt>geodetic-datum</tt>.</t>

<t>In addition to the <tt>geodetic-datum</tt> value we allow refining the
coordinate and height accuracy using <tt>coord-accuracy</tt> and
<tt>height-accuracy</tt> respectively. When specified these values
override the defaults implied by the <tt>geodetic-datum</tt> value.</t>

<t>Finally, we define an optional feature which allows for changing
the system for which the above values are defined. This optional
feature adds an <tt>alternate-system</tt> value to the reference frame.
This value is normally not present which implies the natural
universe is the system. The use of this value is intended to
allow for creating virtual realities or perhaps alternate
coordinate systems. The definition of alternate systems is
outside the scope of this document.</t>

</section>

<section title="Location">
<t>This is the location on or relative to the astronomical object.
It is specified using 2 or 3 coordinates values. These values are
given either as <tt>latitude</tt>, <tt>longitude</tt>, and an optional
<tt>height</tt>, or as Cartesian coordinates of <tt>x</tt>, <tt>y</tt> and an optional
<tt>z</tt>. For the standard location choice <tt>latitude</tt> and <tt>longitude</tt>
are specified as fractions of decimal degrees, and the <tt>height</tt>
value is in fractions of meters. For the Cartesian choice <tt>x</tt>,
<tt>y</tt> and <tt>z</tt> are in fractions of meters. In both choices the exact
meanings of all of the values are defined by the <tt>geodetic-datum</tt>
value in the <xref target="org9ec810e"></xref>.</t>

</section>

<section title="Motion">
<t>Support is added for objects in relatively stable motion. For
objects in relatively stable motion there are an additional 2
values to describe their velocity; these are <tt>heading</tt> and
<tt>speed</tt>. The <tt>heading</tt> value is relative to true-north as defined
by the <tt>reference-frame</tt> for the astronomical body. The <tt>speed</tt>
value is in fractional meters per second. For some applications
that demand high accuracy, and where the data is infrequently
updated this value can track very slow movement such as
continental drift.</t>

</section>

<section title="Tree">
<t>The following is the YANG tree diagram <xref target="RFC8340"/> for the
geo-location grouping.</t>

<figure><name>Geo Location YANG tree diagram.</name><artwork><![CDATA[
  module: geo-location
      +-- geo-location
         +-- reference-frame
         |  +-- alternate-system?    string {alternate-systems}?
         |  +-- astronomical-body?   string
         |  +-- geodetic-system
         |     +-- geodetic-datum?    string
         |     +-- coord-accuracy?    decimal64
         |     +-- height-accuracy?   decimal64
         +-- (location)
         |  +--:(ellipsoid)
         |  |  +-- latitude     degrees
         |  |  +-- longitude    degrees
         |  |  +-- height?      decimal64
         |  +--:(cartesian)
         |     +-- x            decimal64
         |     +-- y            decimal64
         |     +-- z?           decimal64
         +-- velocity
         |  +-- heading?   degrees
         |  +-- speed?     decimal64
         +-- timestamp?         types:date-and-time
]]></artwork></figure>

</section>

</section>


<section title="YANG Module">
<sourcecode><![CDATA[
// -*- fill-column: 69 -*-
module geo-location {
  namespace "urn:ietf:geo-location";
  prefix geo;
  import ietf-yang-types { prefix types; }

  organization
    "IETF NETMOD Working Group (NETMOD)";
  contact
    "Christian Hopps <chopps@chopps.org>";

  // RFC Ed.: replace XXXX with actual RFC number and
  // remove this note.

  description
    "This module defines a grouping of a container object for
     specifying a location on or around an astronomical object (e.g.,
     The Earth).

     Copyright (c) 2018 IETF Trust and the persons identified as
     authors of the code. All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject to
     the license terms contained in, the Simplified BSD License set
     forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
     NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
     'MAY', and 'OPTIONAL' in this document are to be interpreted as
     described in BCP 14 [RFC2119] [RFC8174] when, and only when,
     they appear in all capitals, as shown here.

     This version of this YANG module is part of RFC XXXX
     (https://tools.ietf.org/html/rfcXXXX); see the RFC itself for
     full legal notices.";

  // RFC Ed.: replace XXXX with actual RFC number and
  // remove this note.

  revision 2019-02-17 {
    description "Initial Revision";
    reference "RFC XXXX: YANG Geo Location";
  }

  typedef degrees {
    type decimal64 {
      fraction-digits 16;
    }
    units "decimal degrees";
    description "Coordinate value.";
  }

  feature alternate-systems {
    description
      "This feature means the device supports specifying locations
       using alternate systems for reference frames.";
  }

  grouping geo-location {
   description
      "Grouping to identify a location on an astronomical object.";

    container geo-location {
      description
	"A location on an astronomical body (e.g., The Earth)
	 somewhere in a universe.";

      container reference-frame {
	description
	  "The Frame of Reference for the location values.";

	leaf alternate-system {
	  if-feature alternate-systems;
	  type string;
	  description
	    "The system in which the astronomical body and
	     geodetic-datum is defined. Normally, this value is not
	     present and the system is the natural universe; however,
	     when present this value allows for specifying alternate
	     systems (e.g., virtual realities). An alternate-system
	     modifies the definition (but not the type) of the other
	     values in the reference frame.";
	}
	leaf astronomical-body {
	  type string {
	    pattern
	      '[-0-9a-z #x22#x23#x5B#x5D' +
		'!$%&()*+,\./:;<=>?@\\^_`{|}~]+';
	  }
	  default "earth";
	  description
	    "An astronomical body as named by the International
	     Astronomical Union (IAU) or according to the alternate
	     system if specified. Examples include 'sun' (our star),
	     'earth' (our planet), 'moon' (our moon), 'enceladus' (a
	     moon of Saturn), 'ceres' (an asteroid),
	     '67p/churyumov-gerasimenko (a comet). The value should
	     be comprised of all lower case ASCII characters not
	     including control characters (i.e., values 32..64, and
	     91..126)";
	}
	container geodetic-system {
	  description
	    "The geodetic system of the location data.";
	  leaf geodetic-datum {
	    type string {
	      pattern
		'[-0-9a-z#x22#x23#x5B#x5D' +
		  '!$%&()*+,\./:;<=>?@\\^_`{|}~]+';
	    }
	    default "wgs-84";
	    description
	      "A geodetic-datum defining the meaning of latitude,
	       longitude and height. The default is 'wgs-84' which is
	       used by the Global Positioning System (GPS)";
	  }
	  leaf coord-accuracy {
	    type decimal64 {
	      fraction-digits 6;
	    }
	    description
	      "The accuracy of the latitude longitude pair. When
	       coord-accuracy is specified it overrides the
	       geodetic-datum implied accuracy. If Cartesian
	       coordinates are in use this accuracy corresponds to
	       the X and Y components";
	  }
	  leaf height-accuracy {
	    type decimal64 {
	      fraction-digits 6;
	    }
	    units "meters";
	    description
	      "The accuracy of height value. When specified it
	       overrides the geodetic-datum implied default. If
	       Cartesian coordinates ar in use this accuracy
	       corresponds to the Z component.";
	  }
	}
      }
      choice location {
	mandatory true;
	description
	  "The location data either in lat/long or Cartesian values";
	case ellipsoid {
	  leaf latitude {
	    type degrees;
	    mandatory true;
	    description
	      "The latitude value on the astronomical body. The
	       definition and precision of this measurement is
	       indicated by the reference-frame value.";
	  }
	  leaf longitude {
	    type degrees;
	    mandatory true;
	    description
	      "The longitude value on the astronomical body. The
	       definition and precision of this measurement is
	       indicated by the reference-frame.";
	  }
	  leaf height {
	    type decimal64 {
	      fraction-digits 6;
	    }
	    units "meters";
	    description
	      "Height from a reference 0 value. The precision and '0'
	       value is defined by the reference-frame.";
	  }
	}
	case cartesian {
	  leaf x {
	    type decimal64 {
	      fraction-digits 6;
	    }
	    mandatory true;
	    description
	      "The X value as defined by the reference-frame.";
	  }
	  leaf y {
	    type decimal64 {
	      fraction-digits 6;
	    }
	    mandatory true;
	    description
	      "The Y value as defined by the reference-frame.";
	  }
	  leaf z {
	    type decimal64 {
	      fraction-digits 6;
	    }
	    units "meters";
	    description
	      "The Z value as defined by the reference-frame.";
	  }
	}
      }
      container velocity {
	description
	  "If the object is in motion the velocity describes this
	   motion at the the time given by the timestamp.";

	leaf heading {
	    type degrees;
	    description
		"If the object is in motion then the heading will
		indicate the direction in which the object is
		currently moving. It is specified in fractions of
		degrees from true north of the astronomical object";
	}
	leaf speed {
	  type decimal64 {
	    fraction-digits 12;
	  }
	  units "meters per second";
	  description
	    "If the object is in motion then the speed will
	     indicate the rate at which the object is currently
	     traveling along it's heading.";
	}
      }
      leaf timestamp {
	type types:date-and-time;
	description "Reference time when location was recorded.";
      }
    }
  }
}
]]></sourcecode>

</section>

<section title="ISO 6709:2008 Conformance">
<t><xref target="ISO.6709.2008"/> provides an appendix with a set of tests for
conformance to the standard. The tests and results are given in the
following table along with an explanation of non-applicable tests.</t>

<table>
<name>Conformance Test Results</name>
<thead><tr><th>Test</th><th>Description</th><th>Pass Explanation</th></tr>
</thead>
<tbody><tr><td>A.1.2.1</td><td>elements reqd. for a geo. point location</td><td>CRS is always indicated</td></tr>
<tr><td>A.1.2.2</td><td>Description of a CRS from a register</td><td>CRS register is defined</td></tr>
<tr><td>A.1.2.3</td><td>definition of CRS</td><td>N/A - Don't define CRS</td></tr>
<tr><td>A.1.2.4</td><td>representation of horizontal position</td><td>lat/long values conform</td></tr>
<tr><td>A.1.2.5</td><td>representation of vertical position</td><td>height value conforms</td></tr>
<tr><td>A.1.2.6</td><td>text string representation</td><td>N/A - No string format</td></tr>
</tbody>
</table>

<t>For test <tt>A.1.2.1</tt> the YANG geo location object either includes a CRS
(<tt>reference-frame</tt>) or has a default defined (<xref target="WGS84"/>).</t>

<t>For <tt>A.1.2.3</tt> we do not define our own CRS, and doing so is not
required for conformance.</t>

<t>For <tt>A.1.2.6</tt> we do not define a text string representation, which is
also not required for conformance.</t>

</section>

<section title="Usability">
<t>The geo-location object defined in this document and YANG module have
been designed to be usable in a very broad set of applications.
This includes the ability to locate things on astronomical bodies
other than The Earth, and to utilize entirely different coordinate
systems and realities.</t>

<t>Many systems make use of geo-location data, and so it's important to
be able describe this data using this geo-location object defined in
this document.</t>

<section title="Portability">
<t>In order to verify portability while developing this module the
following standards and standard APIs and were considered.</t>

<section title="IETF URI Value">
<t><xref target="RFC5870"/> defines a standard URI value for geographic location data. It
includes the ability to specify the <tt>geodetic-value</tt> (it calls this
<tt>crs</tt>) with the default being <tt>wgs-84</tt> <xref target="WGS84"/>. For the location data
it allows 2 to 3 coordinates defined by the <tt>crs</tt> value. For accuracy
it has a single <tt>u</tt> parameter for specifying uncertainty. The <tt>u</tt>
value is in fractions of meters and applies to all the location
values. As the URI is a string, all values are specifies as strings
and so are capable of as much precision as required.</t>

<t>URI values can be mapped to and from the YANG grouping, with the
caveat that some loss of precision (in the extremes) may occur due to
the YANG grouping using decimal64 values rather than strings.</t>

</section>

<section title="W3C">
<t>See <eref target="https://w3c.github.io/geolocation-api/#dom-geolocationposition"/>.</t>

<t>W3C Defines a geo-location API in <xref target="W3CGEO"/>. We show a snippet of
code below which defines the geo-location data for this API. This is
used by many application (e.g., Google Maps API).</t>

<figure><name>Snippet Showing Geo-Location Definition</name><sourcecode><![CDATA[
interface GeolocationPosition {
  readonly attribute GeolocationCoordinates coords;
  readonly attribute DOMTimeStamp timestamp;
};

interface GeolocationCoordinates {
  readonly attribute double latitude;
  readonly attribute double longitude;
  readonly attribute double? altitude;
  readonly attribute double accuracy;
  readonly attribute double? altitudeAccuracy;

  readonly attribute double? speed;
};
]]></sourcecode></figure>

<section title="Compare with YANG Model">
<table>

<thead><tr><th>Field</th><th>Type</th><th>YANG</th><th>Type</th></tr>
</thead>
<tbody><tr><td>accuracy</td><td>double</td><td>coord-accuracy</td><td>dec64 fr 6</td></tr>
<tr><td>altitude</td><td>double</td><td>height</td><td>dec64 fr 6</td></tr>
<tr><td>altitudeAccuracy</td><td>double</td><td>height-accuracy</td><td>dec64 fr 6</td></tr>
<tr><td>heading</td><td>double</td><td>heading</td><td>dec64 fr 16</td></tr>
<tr><td>latitude</td><td>double</td><td>latitude</td><td>dec64 fr 16</td></tr>
<tr><td>longitude</td><td>double</td><td>longitude</td><td>dec64 fr 16</td></tr>
<tr><td>speed</td><td>double</td><td>speed</td><td>dec64 fr 12</td></tr>
<tr><td>timestamp</td><td>DOMTimeStamp</td><td>timestamp</td><td>string</td></tr>
</tbody>
</table>

<dl>
<dt>accuracy (double)</dt> <dd><t>Accuracy of <tt>latitude</tt> and <tt>longitude</tt> values
in meters.</t></dd>
<dt>altitude (double)</dt> <dd><t>Optional height in meters above the <xref target="WGS84"/> ellipsoid.</t></dd>
<dt>altitudeAccuracy (double)</dt> <dd><t>Optional accuracy of <tt>altitude</tt> value
in meters.</t></dd>
<dt>heading (double)</dt> <dd><t>Optional Direction in decimal deg from true
north increasing clock-wise.</t></dd>
<dt>latitude, longitude (double)</dt> <dd><t>Standard lat/long values in decimal degrees.</t></dd>
<dt>speed (double)</dt> <dd><t>Speed along heading in meters per second.</t></dd>
<dt>timestamp (DOMTimeStamp)</dt> <dd><t>Specifies milliseconds since the Unix
EPOCH in 64 bit unsigned integer. The YANG model defines the
timestamp with arbitrarily large precision by using a string
which encompasses all representable values of this timestamp
value.</t></dd>
</dl>

<t>W3C API values can be mapped to the YANG grouping, with the caveat
that some loss of precision (in the extremes) may occur due to the
YANG grouping using decimal64 values rather than doubles.</t>

<t>Conversely, only YANG values for The Earth using the default
<tt>wgs-84</tt> <xref target="WGS84"/> as the <tt>geodetic-datum</tt>, can be directly mapped to the
W3C values, as W3C does not provide the extra features necessary to
map the broader set of values supported by the YANG grouping.</t>

</section>

</section>

<section title="Geography Markup Language (GML)">
<t>ISO adopted the Geography Markup Language (GML) defined by OGC 07-036
as <xref target="ISO.19136.2007"/>. GML defines, among many other things, a position
type <tt>gml:pos</tt> which is a sequence of <tt>double</tt> values. This sequence
of values represent coordinates in a given CRS. The CRS is either
inherited from containing elements or directly specified as
attributes <tt>srsName</tt> and optionally <tt>srsDimension</tt> on the <tt>gml:pos</tt>.</t>

<t>GML defines an Abstract CRS type which Concrete CRS types derive
from. This allows for many types of CRS definitions. We are concerned
with the Geodetic CRS type which can have either ellipsoidal or
Cartesian coordinates. We believe that other non-Earth based CRS as
well as virtual CRS should also be representable by the GML CRS types
as well.</t>

<t>Thus GML <tt>gml:pos</tt> values can be mapped directly to the YANG
grouping, with the caveat that some loss of precision (in the
extremes) may occur due to the YANG grouping using decimal64 values
rather than doubles.</t>

<t>Conversely, YANG grouping values can be mapped to GML as directly as
the GML CRS available definitions allow with a minimum of Earth-based
geodetic systems fully supported.</t>

<t>GML also defines an observation value in <tt>gml:Observation</tt> which
includes a timestamp value <tt>gml:validTime</tt> in addition to other
components such as <tt>gml:using</tt> <tt>gml:target</tt> and <tt>gml:resultOf</tt>. Only
the timestamp is mappable to and from the YANG grouping. Furthermore
<tt>gml:validTime</tt> can either be an Instantaneous measure
(<tt>gml:TimeInstant</tt>) or a time period (<tt>gml:TimePeriod</tt>). Only the
instantaneous <tt>gml:TimeInstant</tt> is mappable to and from the YANG
grouping.</t>

</section>

<section title="KML">
<t>KML 2.2 <xref target="KML22"/> (formerly Keyhole Markup Language) was submitted by
Google to Open Geospatial Consortium (OGC)
<eref target="https://www.opengeospatial.org/"/> and was adopted. The latest version
as of this writing is KML 2.3 <xref target="KML23"/>. This schema includes geographic
location data in some of it's objects (e.g., &lt;kml:Point or
&lt;kml:Camera&gt; objects). This data is provided in string format and
corresponds to the <xref target="W3CGEO"/> values. The timestamp value is also
specified as a string as in our YANG grouping.</t>

<t>KML has some special handling for the height value useful for
visualization software, <tt>kml:altitudeMode</tt>. These values for
<tt>kml:altitudeMode</tt> include indicating the height is ignored
(<tt>clampToGround</tt>), in relation to the locations ground level
(<tt>relativeToGround</tt>), or in relation to the geodetic datum
(<tt>absolute</tt>). The YANG grouping can directly map the ignored and
absolute cases, but not the relative to ground case.</t>

<t>In addition to the <tt>kml:altitudeMode</tt> KML also defines two seafloor
height values using <tt>kml:seaFloorAltitudeMode</tt>. One value is to
ignore the height value (<tt>clampToSeaFloor</tt>) and the other is relative
(<tt>relativeToSeaFloor</tt>). As with the <tt>kml:altitudeMode</tt> value, the
YANG grouping supports the ignore case but not the relative case.</t>

<t>The KML location values use a geodetic datum defined in Annex A by
the GML Coordinate Reference System (CRS) <xref target="ISO.19136.2007"/> with
identifier <tt>LonLat84_5773</tt>. The altitude value for KML absolute
height mode is measured from the vertical datum specified by <xref target="WGS84"/>.</t>

<t>Thus the YANG grouping and KML values can be directly mapped in both
directions (when using a supported altitude mode) with the caveat
that some loss of precision (in the extremes) may occur due to the
YANG grouping using decimal64 values rather than strings. For the
relative height cases the application doing the transformation is
expected to have the data available to transform the relative height
into an absolute height which can then be expressed using the YANG
grouping.</t>

</section>

</section>

</section>

<section title="IANA Considerations">
<section title="Geodetic System Value Registry">
<t>This registry allocates names for standard geodetic systems. Often
these values are referred to using multiple names (e.g., full names
or multiple acronyms values). The intent of this registry is to
provide a single standard value for any given geodetic system.</t>

<t>The values SHOULD use an acronym when available, they MUST be
converted to lower case, and spaces MUST be changed to dashes "-".</t>

<t>Each entry should be sufficient to define the 3 coordinate values (2
if height is not required). So for example the <tt>wgs-84</tt> is defined as
WGS-84 with the geoid updated by at least <xref target="EGM96"/> for height values.
Specific entries for <xref target="EGM96"/> and <xref target="EGM08"/> are present if a more precise
definition of the data is required.</t>

<t>It should be noted that <xref target="RFC5870"/> also creates a registry for Geodetic
Systems (it calls CRS); however, this registry has a very strict
modification policy. The authors of <xref target="RFC5870"/> have the stated goal of
making CRS registration hard to avoid proliferation of CRS values. As
our module defines alternate systems and has a broader (beyond earth)
scope, the registry defined below is meant to be more easily modified.</t>

<t>TODO: Open question, should we create a new registry here or attempt
to modify the one created by <xref target="RFC5870"/>. It's worth noting that we
include the ability to specify any geodetic system including ones
designed for astronomical bodies other than the earth, as well as
ones based on alternate systems. These requirements may be too broad
for adapting the existing <xref target="RFC5870"/> registry.</t>

<t>TODO: Open question, is FCFS too easy, perhaps expert review would
strike a good balance. If expert review is acceptable, would it also
be acceptable to update the policy on <xref target="RFC5870"/> and use it instead?</t>

<t>The allocation policy for this registry is First Come First Served,
<xref target="RFC8126"/> as the intent is simply to avoid duplicate values.</t>

<t>The initial values for this registry are as follows.</t>

<table>

<thead><tr><th>Name</th><th>Description</th></tr>
</thead>
<tbody><tr><td>me</td><td>Mean Earth/Polar Axis (Moon)</td></tr>
<tr><td>mola-vik-1</td><td>MOLA Height, IAU Viking-1 PM (Mars)</td></tr>
<tr><td>wgs-84-96</td><td>World Geodetic System 1984 <xref target="WGS84"/> w/ EGM96</td></tr>
<tr><td>wgs-84-08</td><td>World Geodetic System 1984 <xref target="WGS84"/> w/ <xref target="EGM08"/></td></tr>
<tr><td>wgs-84</td><td>World Geodetic System 1984 <xref target="WGS84"/> (EGM96 or better)</td></tr>
</tbody>
</table>

</section>

</section>

<section title="Security Considerations">
<t>This document defines a common geo location grouping using the
YANG data modeling language. The grouping itself has no security
or privacy impact on the Internet, but the usage of the grouping
in concrete YANG modules might have. The security considerations
spelled out in the YANG 1.1 specification <xref target="RFC7950"/> apply for this
document as well.</t>

</section>

</middle>
<back>
<references title="Normative References">
<reference anchor="EGM08" target='http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008/egm08_wgs84.html'>
<front>
<title>An Earth Gravitational Model to Degree 2160: EGM08.</title>
<author initials='N.K.' surname='Pavlis' fullname='N. K. Pavlis'><organization/></author>
<author initials='S.A.' surname='Holmes' fullname='S. A. Holmes'><organization/></author>
<author initials='S.C.' surname='Kenyon' fullname='S. C. Kenyon'><organization/></author>
<author initials='J.K.' surname='Factor' fullname='J. K. Factor'><organization/></author>
<date year="2008"/>
</front><refcontent>Presented at the 2008 General Assembly of the European Geosciences Union, Vienna, Arpil13-18, 2008</refcontent>
</reference>
<reference anchor="EGM96" target='https://cddis.nasa.gov/926/egm96/egm96.html'>
<front>
<title>The Development of the Joint NASA GSFC and the National Imagery and Mapping Agency (NIMA) Geopotential Model EGM96.</title>
<author initials='F.G.' surname='Lemoine' fullname='F. G. Lemoine'><organization/></author>
<author initials='S.C.' surname='Kenyon' fullname='S. C. Kenyon'><organization/></author>
<author initials='J.K.' surname='Factor' fullname='J. K. Factor'><organization/></author>
<author initials='R.G.' surname='Trimmer' fullname='R. G. Trimmer'><organization/></author>
<author initials='N.K.' surname='Pavlis' fullname='N. K. Pavlis'><organization/></author>
<author initials='D.S.' surname='Chinn' fullname='D. S. Chinn'><organization/></author>
<author initials='C.M.' surname='Cox' fullname='C. M. Cox'><organization/></author>
<author initials='S.M.' surname='Klosko' fullname='S. M. Klosko'><organization/></author>
<author initials='S.B.' surname='Luthcke' fullname='S. B. Luthcke'><organization/></author>
<author initials='M.H.' surname='Torrence' fullname='M. H. Torrence'><organization/></author>
<author initials='Y.M.' surname='Wang' fullname='Y. M. Wang'><organization/></author>
<author initials='R.G.' surname='Williamson' fullname='R. G. Williamson'><organization/></author>
<author initials='E.C.' surname='Pavlis' fullname='E. C. Pavlis'><organization/></author>
<author initials='R.H.' surname='Rapp' fullname='R. H. Rapp'><organization/></author>
<author initials='T.R.' surname='Olson' fullname='T. R. Olson'><organization/></author>
<date year="1998"/>
</front><refcontent>Technical Report NASA/TP-1998-206861, NASA, Greenbelt.</refcontent>
</reference>
<reference anchor="ISO.6709.2008">
<front>
<title>ISO 6709:2008 Standard representation of geographic point location by coordinates.</title>
<author><organization>International Organization for Standardization</organization></author>
<date year="2008"/>
</front>
</reference>


<reference  anchor='RFC2119' target='https://www.rfc-editor.org/info/rfc2119'>
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials='S.' surname='Bradner' fullname='S. Bradner'><organization /></author>
<date year='1997' month='March' />
<abstract><t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t></abstract>
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='2119'/>
<seriesInfo name='DOI' value='10.17487/RFC2119'/>
</reference>


<reference  anchor='RFC8174' target='https://www.rfc-editor.org/info/rfc8174'>
<front>
<title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
<author initials='B.' surname='Leiba' fullname='B. Leiba'><organization /></author>
<date year='2017' month='May' />
<abstract><t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t></abstract>
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='8174'/>
<seriesInfo name='DOI' value='10.17487/RFC8174'/>
</reference>


<reference  anchor='RFC8126' target='https://www.rfc-editor.org/info/rfc8126'>
<front>
<title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
<author initials='M.' surname='Cotton' fullname='M. Cotton'><organization /></author>
<author initials='B.' surname='Leiba' fullname='B. Leiba'><organization /></author>
<author initials='T.' surname='Narten' fullname='T. Narten'><organization /></author>
<date year='2017' month='June' />
<abstract><t>Many protocols make use of points of extensibility that use constants to identify various protocol parameters.  To ensure that the values in these fields do not have conflicting uses and to promote interoperability, their allocations are often coordinated by a central record keeper.  For IETF protocols, that role is filled by the Internet Assigned Numbers Authority (IANA).</t><t>To make assignments in a given registry prudently, guidance describing the conditions under which new values should be assigned, as well as when and how modifications to existing values can be made, is needed.  This document defines a framework for the documentation of these guidelines by specification authors, in order to assure that the provided guidance for the IANA Considerations is clear and addresses the various issues that are likely in the operation of a registry.</t><t>This is the third edition of this document; it obsoletes RFC 5226.</t></abstract>
</front>
<seriesInfo name='BCP' value='26'/>
<seriesInfo name='RFC' value='8126'/>
<seriesInfo name='DOI' value='10.17487/RFC8126'/>
</reference>


<reference  anchor='RFC8342' target='https://www.rfc-editor.org/info/rfc8342'>
<front>
<title>Network Management Datastore Architecture (NMDA)</title>
<author initials='M.' surname='Bjorklund' fullname='M. Bjorklund'><organization /></author>
<author initials='J.' surname='Schoenwaelder' fullname='J. Schoenwaelder'><organization /></author>
<author initials='P.' surname='Shafer' fullname='P. Shafer'><organization /></author>
<author initials='K.' surname='Watsen' fullname='K. Watsen'><organization /></author>
<author initials='R.' surname='Wilton' fullname='R. Wilton'><organization /></author>
<date year='2018' month='March' />
<abstract><t>Datastores are a fundamental concept binding the data models written in the YANG data modeling language to network management protocols such as the Network Configuration Protocol (NETCONF) and RESTCONF. This document defines an architectural framework for datastores based on the experience gained with the initial simpler model, addressing requirements that were not well supported in the initial model.  This document updates RFC 7950.</t></abstract>
</front>
<seriesInfo name='RFC' value='8342'/>
<seriesInfo name='DOI' value='10.17487/RFC8342'/>
</reference>
<reference anchor="WGS84" target='http://earth-info.nga.mil/GandG/publications/tr8350.2/wgs84fin.pdf'>
<front>
<title>National Imagery and Mapping Agency Technical Report 8350.2, Third Edition.</title>
<author><organization>National Imagery and Mapping Agency.</organization></author>
<date day="3" month="1" year="2000"/>
</front>
</reference>
</references>

<references title="Informative References">
<reference anchor="ISO.19136.2007">
<front>
<title>ISO 19136:2007 Geographic information -- Geography Markup Language (GML)</title>
<author><organization>International Organization for Standardization</organization></author>
<date/>
</front>
</reference>
<reference anchor="KML22" target='http://portal.opengeospatial.org/files/?artifact_id=27810'>
<front>
<title>OGC KML (Version 2.2)</title>
<author role='editor' initials='T.' surname='Wilson' fullname='Tim Wilson'><organization>Open Geospatial Consortium</organization></author>
<date day="14" month="4" year="2008"/>
</front>
</reference>
<reference anchor="KML23" target='http://docs.opengeospatial.org/is/12-007r2/12-007r2.html'>
<front>
<title>OGC KML 2.3</title>
<author role='editor' initials='D.' surname='Burggraf' fullname='David Burggraf'><organization>Open Geospatial Consortium</organization></author>
<date day="4" month="8" year="2015"/>
</front>
</reference>


<reference  anchor='RFC5870' target='https://www.rfc-editor.org/info/rfc5870'>
<front>
<title>A Uniform Resource Identifier for Geographic Locations ('geo' URI)</title>
<author initials='A.' surname='Mayrhofer' fullname='A. Mayrhofer'><organization /></author>
<author initials='C.' surname='Spanring' fullname='C. Spanring'><organization /></author>
<date year='2010' month='June' />
<abstract><t>This document specifies a Uniform Resource Identifier (URI) for geographic locations using the 'geo\' scheme name.  A 'geo' URI identifies a physical location in a two- or three-dimensional coordinate reference system in a compact, simple, human-readable, and protocol-independent way.  The default coordinate reference system used is the World Geodetic System 1984 (WGS-84).  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='5870'/>
<seriesInfo name='DOI' value='10.17487/RFC5870'/>
</reference>


<reference  anchor='RFC7950' target='https://www.rfc-editor.org/info/rfc7950'>
<front>
<title>The YANG 1.1 Data Modeling Language</title>
<author initials='M.' surname='Bjorklund' fullname='M. Bjorklund' role='editor'><organization /></author>
<date year='2016' month='August' />
<abstract><t>YANG is a data modeling language used to model configuration data, state data, Remote Procedure Calls, and notifications for network management protocols.  This document describes the syntax and semantics of version 1.1 of the YANG language.  YANG version 1.1 is a maintenance release of the YANG language, addressing ambiguities and defects in the original specification.  There are a small number of backward incompatibilities from YANG version 1.  This document also specifies the YANG mappings to the Network Configuration Protocol (NETCONF).</t></abstract>
</front>
<seriesInfo name='RFC' value='7950'/>
<seriesInfo name='DOI' value='10.17487/RFC7950'/>
</reference>


<reference  anchor='RFC8340' target='https://www.rfc-editor.org/info/rfc8340'>
<front>
<title>YANG Tree Diagrams</title>
<author initials='M.' surname='Bjorklund' fullname='M. Bjorklund'><organization /></author>
<author initials='L.' surname='Berger' fullname='L. Berger' role='editor'><organization /></author>
<date year='2018' month='March' />
<abstract><t>This document captures the current syntax used in YANG module tree diagrams.  The purpose of this document is to provide a single location for this definition.  This syntax may be updated from time to time based on the evolution of the YANG language.</t></abstract>
</front>
<seriesInfo name='BCP' value='215'/>
<seriesInfo name='RFC' value='8340'/>
<seriesInfo name='DOI' value='10.17487/RFC8340'/>
</reference>
<reference anchor="W3CGEO" target='https://www.w3.org/TR/2016/REC-geolocation-API-20161108/'>
<front>
<title>Geolocation API Specification</title>
<author initials='A.' surname='Popescu' fullname='Andrei Popescu'><organization/></author>
<date day="8" month="11" year="2016"/>
</front>
</reference>
</references>
<section title="Examples">
<t>Below is a fictitious module that uses the geo-location grouping.</t>

<figure><name>Example YANG module using geo location.</name><sourcecode><![CDATA[
module uses-geo-location {
  namespace "urn:ietf:uses-geo-location";
  prefix ugeo;
  import geo-location { prefix geo; }
  organization "Empty Org";
  contact "Example Author <eauthor@example.com>";
  description "Example use of geo-location";
  revision 2019-02-02 { reference "None"; }
  container locatable-items {
    description "container of locatable items";
    list locatable-item {
      key name;
      description "A of locatable item";
      leaf name {
	type string;
	description "name of locatable item";
      }
      uses geo:geo-location;
    }
  }
}
]]></sourcecode></figure>

<t>Below is a the YANG tree for the fictitious module that uses the
geo-location grouping.</t>

<artwork><![CDATA[
module: uses-geo-location
  +--rw locatable-items
     +--rw locatable-item* [name]
        +--rw name            string
        +--rw geo-location
           +--rw reference-frame
           |  +--rw alternate-system?    string {alternate-systems}?
           |  +--rw astronomical-body?   string
           |  +--rw geodetic-system
           |     +--rw geodetic-datum?    string
           |     +--rw coord-accuracy?    decimal64
           |     +--rw height-accuracy?   decimal64
           +--rw (location)
           |  +--:(ellipsoid)
           |  |  +--rw latitude     degrees
           |  |  +--rw longitude    degrees
           |  |  +--rw height?      decimal64
           |  +--:(cartesian)
           |     +--rw x            decimal64
           |     +--rw y            decimal64
           |     +--rw z?           decimal64
           +--rw velocity
           |  +--rw heading?   degrees
           |  +--rw speed?     decimal64
           +--rw timestamp?         types:date-and-time
]]></artwork>

<t>Below is some example YANG XML data for the fictitious module that
uses the geo-location grouping.</t>

<figure><name>Example XML data of geo location use.</name><sourcecode><![CDATA[
<ns0:config xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0">
  <locatable-items xmlns="urn:ietf:uses-geo-location">
    <locatable-item>
      <name>Gaetana's</name>
      <geo-location>
	<latitude>40.73297</latitude>
	<longitude>-74.007696</longitude>
      </geo-location>
    </locatable-item>
    <locatable-item>
      <name>Pont des Arts</name>
      <geo-location>
	<timestamp>2012-03-31T16:00:00Z</timestamp>
	<latitude>48.8583424</latitude>
	<longitude>2.3375084</longitude>
	<height>35</height>
      </geo-location>
    </locatable-item>
    <locatable-item>
      <name>Saint Louis Cathedral</name>
      <geo-location>
	<timestamp>2013-10-12T15:00:00-06:00</timestamp>
	<latitude>29.9579735</latitude>
	<longitude>-90.0637281</longitude>
      </geo-location>
    </locatable-item>
    <locatable-item>
      <name>Apollo 11 Landing Site</name>
      <geo-location>
	<timestamp>1969-07-21T02:56:15Z</timestamp>
	<reference-frame>
	  <astronomical-body>moon</astronomical-body>
	  <geodetic-system>
	    <geodetic-datum>me</geodetic-datum>
	  </geodetic-system>
	</reference-frame>
	<latitude>0.67409</latitude>
	<longitude>23.47298</longitude>
      </geo-location>
    </locatable-item>
  </locatable-items>
</ns0:config>
]]></sourcecode></figure>

</section>

<section title="Acknowledgements">
<t>We would like to thank Peter Lothberg for the motivation as well as
help in defining a more broadly useful geographic location object.</t>

<t>We would also like to thank Acee Lindem and Qin Wu for their work on
a geographic location object that led to this documents creation.</t>

</section>
  </back>
</rfc>
