<?xml version="1.0" encoding="utf-8"?>
<!-- 
     draft-rfcxml-general-template-standard-00
  
     This template includes examples of the most commonly used features of RFCXML with comments 
     explaining how to customise them. This template can be quickly turned into an I-D by editing 
     the examples provided. Look for [REPLACE], [REPLACE/DELETE], [CHECK] and edit accordingly.
     Note - 'DELETE' means delete the element or attribute, not just the contents.
     
     Documentation is at https://authors.ietf.org/en/templates-and-schemas
-->
<?xml-model href="rfc7991bis.rnc"?>  <!-- Required for schema validation and schema-aware editing -->
<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> -->
<!-- This third-party XSLT can be enabled for direct transformations in XML processors, including most browsers -->


<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<!-- If further character entities are required then they should be added to the DOCTYPE above.
     Use of an external entity file is not recommended. -->

<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std"
  docName="draft-banks-ecrit-lost-3d-profile-00"
  ipr="trust200902"
  obsoletes=""
  updates="5222"
  submissionType="IETF"
  xml:lang="en"
  version="3">
<!-- [REPLACE] 
       * docName with name of your draft
     [CHECK] 
       * category should be one of std, bcp, info, exp, historic
       * ipr should be one of trust200902, noModificationTrust200902, noDerivativesTrust200902, pre5378Trust200902
       * updates can be an RFC number as NNNN
       * obsoletes can be an RFC number as NNNN 
-->

  <front>
    <title abbrev="A 3D Profile for LoST">A 3D Location Profile for the Location-to-Service Translation (LoST) Protocol</title>
    <!--  [REPLACE/DELETE] abbrev. The abbreviated title is required if the full title is longer than 39 characters -->

    <seriesInfo name="Internet-Draft" value="draft-banks-ecrit-lost-3d-profile-00"/>
   
    <author fullname="Dan Banks" initials="D" surname="Banks">
      <!-- [CHECK]
             * initials should not include an initial for the surname
             * role="editor" is optional -->
    <!-- Can have more than one author -->
      
    <!-- all of the following elements are optional -->
      <organization>DATAMARK Technologies</organization>
      <address>
        <postal>
          <!-- Reorder these if your country does things differently -->
          <city>Columbus</city>
          <region>OH</region>
          <country>US</country>
          <!-- Uses two letter country code -->
        </postal>        
        <email>dbanks@ddti.net</email>  
        <!-- Can have more than one <email> element -->
      </address>
    </author>
   
    <date year="2025"/>
    <!-- On draft subbmission:
         * If only the current year is specified, the current day and month will be used.
         * If the month and year are both specified and are the current ones, the current day will
           be used
         * If the year is not the current one, it is necessary to specify at least a month and day="1" will be used.
    -->

    <area>ART</area>
    <workgroup>ecrit</workgroup>
    <!-- "Internet Engineering Task Force" is fine for individual submissions.  If this element is 
          not present, the default is "Network Working Group", which is used by the RFC Editor as 
          a nod to the history of the RFC Series. -->

    <keyword>LoST</keyword>
    <!-- [REPLACE/DELETE]. Multiple allowed.  Keywords are incorporated into HTML output files for 
         use by search engines. -->

    <abstract>
      <t>This document defines a new location profile containing three-dimensional (3D) shapes to be used with the Location-to-Service Translation Protocol (LoST) defined in RFC 5222.  Registration of the 3D location profile in the "Location-to-Service Translation (LoST) Location Profiles" IANA registry is requested accordingly.  Inconsistencies in RFC 5222 relating to additional location profiles are revised and additional clarification is given to assist implementors when using this profile.</t>
    </abstract>
 
  </front>

  <middle>
    
    <section>
      <name>Introduction</name>
      <t>The Location-to-Service Translation (LoST) Protocol <xref target="RFC5222"/> uses a location profile when conveying location in a request or response.  The LoST specification includes two baseline location profiles and mandates that exactly one of baseline profiles be used in addition to zero or more additional profiles.  The baseline profile for expressing a location in geodetic form is "geodetic-2d", and the profile allows a subset of the shapes described in <xref target="RFC5491"/> (which are in turn taken from GeoShape).  With the exception of a point having three coordinates, no 3D shapes are included in the "geodetic-2d" profile.</t>

      <t>Location supplied with emergency calls is now commonly provided with three-dimensional attributes representing a volume where the caller is likely to be found.  The Sphere, Ellipsoid, and Prism shapes from RFC 5491 and GeoShape are used to represent this volume and can be included in PIDF-LO, but cannot be used to query a LoST server because they are not included in any existing location profile.  It is desirable for a LoST server be able to take elevation into account in order to provide different mappings in the &lt;findServiceResponse&gt; for locations that would otherwise share a common horizontal position.  Further, it is not desirable to discard the representation of uncertainty (e.g., query using a 3D point) in order to include elevation.  To overcome these limitations and to fully accommodate the 3D shapes that are expected in PIDF-LO, we introduce the "geodetic-3D" profile.</t>
      
      <t>Some text in RFC 5222 discussing multiple location profiles, particularly with respect to service boundaries, is confusing or inconsistent.  With the addition of a new location profile, it is necessary to provide the revisions and clarifications which can be found below.  Additionally, a number of implementations of LoST have been observed to behave contrary to certain requirements in RFC 5222, leading to interoperability issues.  Further guidance is therefore provided to assist implementors in achieving conformance and interoperability.</t>


      <section>
        <name>Requirements Language</name>
        <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 BCP 14 <xref target="RFC2119"/>
          <xref target="RFC8174"/> when, and only when, they appear in
          all capitals, as shown here.</t>
      </section>
      <!-- [CHECK] The 'Requirements Language' section is optional -->

    </section>
    
    <section>
      <name>Three-Dimensional Geodetic Profile</name>
      <t>The "geodetic-3d" location profile is identified by the token "geodetic-3d" and derives from the baseline "geodetic-2d" profile.  As with the "geodetic-2d" profile, clients and servers use this profile by placing shapes into a &lt;location&gt; or &lt;serviceBoundary&gt; element.</t>

      <section>
        <name>Shapes</name>
        <t>This section identifies the shapes allowable within the "geodetic-3d" profile.  All of the following are fully defined, including XML schema, in <xref target="GeoShape"/>.  Note that the 'srsName' for three-dimensional shapes is "urn:ogc:def:crs:EPSG::4979", not "urn:ogc:def:crs:EPSG::4326" as used with two-dimensional shapes.</t>
        <section>
          <name>Point</name>
          <t>The &lt;Point&gt; element is described in <xref target="RFC5491" section="5.2.1"/> and can be represented using either two-dimensional or three-dimensional coordinates.  Both forms are permitted within the "geodetic-2d" profile, but only the three-dimensional &lt;Point&gt; is permitted within the "geodetic-3d" profile.  The purpose for allowing the &lt;Point&gt; to be used within both profiles is discussed in section 5, below.</t>
        </section>

        <section>
          <name>Sphere</name>
          <t>The &lt;Sphere&gt; element is described in <xref target="RFC5491" section="5.2.6"/>.</t>
        </section>

        <section>
          <name>Ellipsoid</name>
          <t>The &lt;Ellipsoid&gt; element is described in <xref target="RFC5491" section="5.2.7"/>.  Note that while the &lt;Ellipsoid&gt; contains elements representing the semi-major and semi-minor axes, the vertical dimension is contained within the &lt;verticalAxis&gt; element which represents the full length of the vertical axis rather than a semi-axis.</t>
        </section>

        <section>
          <name>Prism</name>
          <t>The &lt;Prism&gt; element is described in <xref target="RFC5491" section="5.2.8"/>.</t>
        </section>    
      </section>

      <section>
      <name>Meaning of Shapes</name>
      <t>When a client uses one of the &lt;Sphere&gt;, &lt;Ellipsoid&gt;, or &lt;Prism&gt; elements, the shape represents a volume of uncertainty.  The discussion in <xref target="RFC5222" section="12.2"/> regarding the area of two-dimensional shapes applies similarly to the volume of three-dimensional shapes.  That is, the client is expected to be satisfied by a result pertaining to any portion of the volume, multiple &lt;mapping&gt; elements MAY be returned when applicable, and a server that understands the "geodetic-3d" profile and is authoritative for any part of the queried volume MUST return either a &lt;mapping&gt; or a &lt;redirect&gt; to another server whose coverage area is a subset of the earlier server's coverage area.</t>
      
      </section>
    </section>

    <section>
      <name>Usage in a LoST Query</name>
      <t>When a client wishes to query a LoST server using the "geodetic-3d" profile, it MUST conform to the behavior described in <xref target="RFC5222" section="12"/>.  Specifically, the request MUST contain location information in the baseline "geodetic-2d" profile in addition to the "geodetic-3d" profile, and it MUST NOT contain location information in the baseline "civic" profile or any other profile that derives from the "civic" profile.  The request MAY include location in other profiles that derive from the "geodetic-2d" profile.  Locations in separate profiles MUST appear as separate &lt;location&gt; elements.  Because "a server uses the first-listed location profile that it understands and ignores the others" (<xref target="RFC5222" section="12.1"/>, rule 7), the "geodetic-3d" location should be placed before the "geodetic-2d" location in the query or it will not be considered.</t>
      <t>It is possible that the location information a LoST client is in possession of solely fits the "geodetic-3d" profile.  In order to meet the above requirements, the client will need to produce a corresponding location within the "geodetic-2d" profile.  For example, a client in possession of an &lt;Ellipsoid&gt; could produce a corresponding &lt;Ellipse&gt;.  In general, the client SHOULD produce a 2D shape that reasonably represents the footprint of the original shape.</t>
      <t><xref target="RFC7459" section="5.3"/> discusses a simple conversion technique for each of the shapes (except Point) in the "geodetic-3d" profile.  RFC 7459 also discusses the effect that the suggested conversion has upon the confidence of the resultant shape.  Note that the representation of confidence defined by RFC 7459 for use in PIDF-LO is not included within either the "geodetic-2d" or "geodetic-3d" profile.  Although it may be possible to manipulate the uncertainty and confidence of a shape to scale one at the expense of the other, the client is not expected to perform such manipulation for the purpose of formulating a LoST query.</t>
    </section>

    <section>
      <name>Usage in a LoST Response</name>
      <t>Per <xref target="RFC5222" section="5.5"/>, the LoST response may represent a service region using "one or more &lt;serviceBoundary&gt; elements" and that the elements be in varying location profiles.  The text in section 12.1 allows that "A response MAY contain multiple mappings or boundaries for the different &lt;location&gt; elements, subject to the restrictions below."</t>
      <t>However, <xref target="RFC5222" section="12.1"/>, rule 7 states "A server uses the first-listed location profile that it understands and ignores the others."  Rule 9 further adds "The &lt;serviceBoundary&gt; element MUST use the same location profile that was used to retrieve the answer and indicates which profile has been used with the 'profile' attribute."  And finally, the schema only allows a single &lt;locationUsed&gt; element which applies to the entire &lt;findServiceResponse&gt;, not individual &lt;mapping&gt; elements.</t>
      <t>Until now, there have been no profiles beyond the baseline profiles, so this contradiction was of no practical consequence.  Additionally, it is recognized that a server could understand a profile (such as the "geodetic-3d" profile) but not have the data necessary to determine a response for that profile.  For example, service regions may not be described in three dimensions for all areas and the server would be unable to produce a &lt;serviceBoundary&gt; in the "geodetic-3d" profile.  For those reasons, Rule 7 is amended as follows:</t>
      <ol type="1" start="7">
        <li>A server uses the first-listed location that it both understands and is able to formulate a response for.  Other locations are ignored.</li>
      </ol>
      <t>Further, we reaffirm rule 9.  A &lt;mapping&gt; therefore MUST NOT contain multiple &lt;serviceBoundary&gt; elements, section 5.5 notwithstanding.  Any &lt;serviceBoundary&gt; sent to a client will conform to one of the profiles used in the request, so no additional representations are needed in order to assure that the client understands the boundary.</t>
      <t>Lastly, section 5.5 states that multiple locations within a &lt;serviceBoundary&gt; are additive and expresses intent for this to apply to both shapes and civic locations.  The last paragraph of <xref target="RFC5222" section="12.2"/> seemingly contradicts this and states that such elements are alternative descriptions, not additive geometries.  However, the practical consequence of allowing "alternate" descriptions is that they would effectively be additive.  Replacing the entire final paragraph of section 12.2, we revise the usage of multiple shapes as follows:</t>
      <ul empty="true">
        <li>When multiple geodetic shapes are placed within a single &lt;serviceBoundary&gt; element, all the shapes MUST belong to the location profile identified for the &lt;serviceBoundary&gt; and the resultant boundary encompasses the area or volume represented by the combination of all the shapes.  However, complex boundary representations might be problematic for performance and servers MAY choose not to return any &lt;serviceBoundary&gt; for a request.</li>
      </ul>
    </section>

    <section>
      <name>Considerations for Points</name>
      <t>The &lt;Point&gt; element used in the "geodetic-2d" profile is permitted to have either two or three coordinates, so it is not necessary to use the "geodetic-3d" profile in order to query with a &lt;Point&gt; having three-dimensional coordinates and obtain an answer.  However, such a query using the "geodetic-2d" profile precludes the return of a &lt;serviceBoundary&gt; that includes elevation information.  Additionally, in the event that altitude of the point is used to choose a service region that otherwise would not have been chosen using horizontal coordinates alone, it would be incorrect to return a &lt;serviceBoundary&gt; in the "geodetic-2d" profile.</t>
      <t>In order to allow for a &lt;serviceBoundary&gt; in the "geodetic-3d" profile to be returned when the LoST server is queried with a three-coordinate &lt;Point&gt;, such a &lt;Point&gt; is permitted within the "geodetic-3d" profile.  A client still MUST include a location in the "geodetic-2d" baseline profile as well, which MAY be the same &lt;Point&gt;.  A server MAY then return a &lt;serviceBoundary&gt; according to whichever profile was actually used to determine the response.</t>
    </section>
    
    <section>
      <name>Considerations for Polygons</name>
      <t>The &lt;Polygon&gt; defined in <xref target="GeoShape"/> can be specified using points with either two coordinates or three, with the third (altitude) being constant.  The latter construct is useful when serving as the base of a &lt;Prism&gt;.  <xref target="RFC5491"/> and <xref target="RFC5222"/> give special consideration to the &lt;Point&gt; in permitting the altitude to be included when used in the "geodetic-2d" profile, but no such consideration is given to &lt;Polygon&gt;.  Thus, a &lt;Polygon&gt; used in the "geodetic-2d" profile MUST NOT include three-dimensional coordinates.  Because &lt;Polygon&gt; is identified in RFC 5491 only as "(2d)", &lt;Polygon&gt; is intentionally omitted from the "geodetic-3d" profile (except as used within &lt;Prism&gt;).</t>
    </section>
    
    <section>
      <name>Limitations</name>
      <t>Within the "geodetic-2d" profile, any two-dimensional shape can be approximated (ignoring whether the shape is truly planar or is relative to the ellipsoid) to an arbitrary degree with a &lt;Polygon&gt;.  While the shapes included in the "geodetic-3d" profile are expected to be adequate for representing location in a query, they do not allow such approximation of all three-dimensional shapes.  Consequently, a server may not be able to produce a comprehensive representation of a three-dimensional service region.  However, a server MAY choose to return a &lt;serviceBoundary&gt; containing a simplified shape that fits entirely within the true shape of complex region.</t>
    </section>
    
    <section anchor="IANA">
    <!-- All drafts are required to have an IANA considerations section. See RFC 8126 for a guide.-->
      <name>IANA Considerations</name>
      <t>IANA is requested to add the "geodetic-3d" profile name to the "Location-to-Service Translation (LoST) Location Profiles" registry established by <xref target="RFC5222"/>.</t>
    </section>
    
    <section anchor="Security">
      <!-- All drafts are required to have a security considerations section. See RFC 3552 for a guide. -->
      <name>Security Considerations</name>
      <t>The introduction of the 3D location profile to LoST should not create any new security considerations beyond those described in <xref target="RFC5222" section="18"/> or otherwise modify the security of the LoST protocol.</t>
    </section>
    
    <!-- NOTE: The Acknowledgements and Contributors sections are at the end of this template -->
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5222.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5491.xml"/>
        <!-- The recommended and simplest way to include a well known reference -->
        <reference anchor="GeoShape">
          <front>
            <title>GML 3.1.1 PIDF-LO Shape Application Schema for use by the Internet Engineering Task Force (IETF)</title>
            <author initials="C" surname="Reed" fullname="Carl Reed" role="editor">
              <organization>Open Geospatial Consortium Inc.</organization>
            </author>
            <author initials="M" surname="Thomson" fullname="Martin Thomson" role="editor">
              <organization>Open Geospatial Consortium Inc.</organization>
            </author>
            <date year="2007" month="April" day="10"></date>
          </front>
          <refcontent>Candidate OpenGIS Implementation Specification 06-142r1, Version: 1.0</refcontent>
        </reference>
        
      </references>
 
      <references>
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7459.xml"/>
      </references>
    </references>
 </back>
</rfc>
