There has been some discussion on the jdev list [1] about adding 'source' and 'provider' fields to the <geoloc> element of XEP-0080 in order to be able to specify multiple location sources for a single entity.

The 'source' specifies the origin of the location information, and the 'provider' specifies the mechanism by which the geolocation information is computed.

For example, the following XML segment shows a user's GPS location coming from Mozilla's Geode:

<geoloc xmlns='http://jabber.org/protocol/geoloc' xml:lang='en'>
 <source>gps</source>
 <provider>Geode</provider>
 <lat>45.44</lat>
 <lon>12.33</lon>
</geoloc>


Attached is a patch that adds these fields and their descriptions.


Ilya


[1] http://mail.jabber.org/pipermail/jdev/2010-February/088083.html

Index: xep-0080.xml
===================================================================
--- xep-0080.xml	(revision 4149)
+++ xep-0080.xml	(working copy)
@@ -145,6 +145,7 @@
     <li>The GPS encoding mechanism shall have a single set of units, so that receivers do not need to use heuristics to determine an entity's position.</li>
     <li>It shall be possible to specify the known amount of error in the GPS coordinates.</li>
     <li>It shall be possible to include a natural-language description of the location.</li> 
+    <li>It shall be possible to specify multiple location sources for a single entity.</li>
   </ul>
 </section1>
 <section1 topic='Data Format' anchor='format'>
@@ -247,6 +248,12 @@
       <td>10027</td>
     </tr>
     <tr>
+      <td>provider</td>
+      <td>xs:string</td>
+      <td>The mechanism by which the geolocation information is computed</td>
+      <td>Geode</td>
+    </tr>
+    <tr>
       <td>region</td>
       <td>xs:string</td>
       <td>An administrative region of the nation, such as a state or province</td>
@@ -259,6 +266,12 @@
       <td>Observatory</td>
     </tr>
     <tr>
+      <td>source</td>
+      <td>xs:string</td>
+      <td>The origin of the location information</td>
+      <td>gps</td>
+    </tr>
+    <tr>
       <td>speed</td>
       <td>xs:decimal</td>
       <td>The speed at which the entity is moving, in meters per second</td>
@@ -365,6 +378,12 @@
   <p>Inferences SHOULD NOT be made about accuracy from the number of digits specified in the location or altitude.</p>
   <p>Why the datum madness? See &lt;<link url='http://www.xmpp.org/extensions/gps_datum.html'>http://www.xmpp.org/extensions/gps_datum.html</link>&gt; for an example.</p>
   <p>An entity can provide a GPS path by publishing a series of items (i.e., multiple pubsub events) with appropriate values of the &lt;timestamp/&gt; element.</p>
+  <p>Although no restriction is placed on values for the &lt;source/&gt; field, to facilitate interoperability the values MAY correspond to those in the following table, in addition to the &lt;reftype/&gt; names in <cite>XEP-0255</cite><note>XEP-0255: Location Query &lt;<link url='http://xmpp.org/extensions/xep-0255.html'>http://xmpp.org/extensions/xep-0255.html</link>&gt;.</note>:</p>
+  <table caption='Suggested source values'>
+    <tr><th>Value</th><th>Description</th></tr>
+    <tr><td>gps</td><td>Obtained directly from a GPS unit</td></tr>
+    <tr><td>user</td><td>Entered manually by a user or operator</td></tr>
+  </table>
 </section1>
 
 <section1 topic='Mapping to Other Formats' anchor='mapping'>
@@ -463,6 +482,14 @@
       </td>
       <td align='center'>--</td>
     </tr>
+    <tr>
+      <td align='center'>&lt;source/&gt;</td>
+      <td align='center'>--</td>
+      <td align='center'>&lt;method/&gt;
+        <note>The values for &lt;method/&gt; are limited to those registered by <link url='http://tools.ietf.org/html/rfc4119'>RFC 4119</link>.</note>
+      </td>
+      <td align='center'>--</td>
+    </tr>
   </table>
 </section1>
 
@@ -519,8 +546,10 @@
         <xs:element name='locality' minOccurs='0' type='xs:string'/>
         <xs:element name='lon' minOccurs='0' type='xs:decimal'/>
         <xs:element name='postalcode' minOccurs='0' type='xs:string'/>
+        <xs:element name='provider' minOccurs='0' type='xs:string'/>
         <xs:element name='region' minOccurs='0' type='xs:string'/>
         <xs:element name='room' minOccurs='0' type='xs:string'/>
+        <xs:element name='source' minOccurs='0' type='xs:string'/>
         <xs:element name='speed' minOccurs='0' type='xs:decimal'/>
         <xs:element name='street' minOccurs='0' type='xs:string'/>
         <xs:element name='text' minOccurs='0' type='xs:string'/>

Reply via email to