%ents; ]>
Data Forms Geolocation Element This specification defines an XMPP protocol extension for including geolocation data in XEP-0004 data forms. &LEGALNOTICE; 0350 Deferred Standards Track Standards XMPP Core XEP-0004 XEP-0080 XEP-0122 geolocation-element http://www.xmpp.org/schemas/geolocation-element.xsd Michael Laukner laukner@gmail.com laukner@jabber.org 0.2 2017-09-11 XEP Editor (jwi) Defer due to lack of activity. 0.1 2014-07-03 editor (mam)

Initial published version approved by the XMPP Council.

0.0.3 2014-06-28 ml

Updated version, added 'geo:' datatypes to support 'text-single' use case.

0.0.2 2014-06-25 ml

Updated version, added XEP-0122 'geo:' datatypes.

0.0.1 2014-06-11 ml

Initial version, borrowing from XEP-0221.

In certain protocols that make use of &xep0004;, it can be helpful to include geolocation data. One example of such a "using protocol" is &xep0346;. This document defines a method for including geolocation data in a Data Form for something you manage and want to publish. This XEP leaves it open to developers how such a <geoloc/> form element will be rendered; possibilities might include editing Latitude and Longitude manually or through a rendered map.

There may also be the need to gather location data from both humans (using a GUI format) and computer processes (using a pre-defined but flexible format). This document defines a flexible mechanism for the ®ISTRAR; to standardize geographical location field names in data forms, thus enabling XMPP clients to process location fields in forms while giving protocol authors a way to specify additional location data types for non-GUI processors to determine the semantic meanings of a location field.

This proposal addresses the following requirements:

The root element for geolocation data is <geoloc/> as defined in &xep0080;. The information is structured by means of a <geoloc/> element that is qualified by the 'http://jabber.org/protocol/geoloc' namespace. The <geo/> element MUST be contained within a <field/> element qualified by the 'jabber:x:data' namespace.

The following example is provided only for the purpose of illustration; consult the specifications for using protocols (e.g., XEP-0080) to see canonical examples.

[ ... ] Venice, Italy Venice Italy 45.44 12.33 [ ... ] ]]>

All elements associated with location fields MUST be qualified by the 'http://jabber.org/protocol/geoloc' namespace. The use of namespace prefixes is RECOMMENDED for large forms, to reduce the data size. To maintain the highest level of compatibility, implementations sending the form using prefixes SHOULD use the namespace prefix "geo:", and SHOULD declare the namespace prefix mapping in the ancestor <x xmlns='jabber:x:data'/> element:

The following example is provided only for the purpose of illustration; consult the specifications for using protocols (e.g. XEP-0080, XEP-0122) to see canonical examples.

Sample Location Form Please provide information for the following location fields... ]]>

The integration with Data Forms is accomplished via the datatypes specified in &xep0122;. Each datatype is specific to the profile desired. The sender MUST use the 'geo:' datatypes as specified in XEP-0122. When submitting a form, a field's value(s) MUST be validated by the receiving entity based on the 'geo:' datatype identifier(s). Also, the submitter MUST provide a 'geo:' element for each location element within the data form. If a form-submitting entity receives a field type it does not understand, the 'text-single' field type from XEP-0004 MUST be assumed.

It is imperative to control access to location information, at least by default. Imagine that a stalker got unauthorized access to this information, with enough accuracy and timeliness to be able to find the target person. This scenario could lead to loss of life, so please take access control checks seriously. If an error is deliberately added to a location, the error SHOULD be the same for all receivers, to minimize the likelihood of triangulation. In the case of deliberate error, the <accuracy /> element SHOULD NOT be included.

This document requires no interaction with the &IANA;.

The ®ISTRAR; already includes 'http://jabber.org/protocol/geoloc' in its registry of protocol namespaces (see &NAMESPACES;).

The XMPP Registrar includes 'geo:' in its registry of Data Forms Validation Datatype Prefixes.

Normally, each geographic format that wishes to be considered for use with Data Forms MUST register its own datatype qualified by the "geo:" prefix. However, this document provides an initial seed, based on the currently assumed formats. The following datatypes shall be registered for use with Data Forms Validation:

geo:lat Datatype for publishing the latitude of a geographic location XEP-0080 ]]> 45.44 ]]> geo:lon Datatype for publishing the longitude of a geographic location XEP-0080 ]]> 12.33 ]]>

The XMPP Registrar MAY include 'geo:' datatypes in its registry of Data Forms Validation Datatypes, which can be used with the 'text-single' field type from XEP-0004.

geo:dms Datatype for publishing a degrees, minutes, and seconds (DMS) location Degree Minutes and Seconds, 'http://en.wikipedia.org/wiki/Geographic_coordinate_system'. ]]> ([-|\\+]?\\d{1,3}[d|D|\u00B0|\\s](\\s*\\d{1,2}['|\u2019|\\s])?(\\s*\\d{1,2}[\"|\u201d])?\\s*[N|n|S|s]?)?(\\s*|,|,\\s*)?([-|\\+]?\\d+?(\\.\\d+?)??\\s*[E|e|W|w]??) 52d18'24.4775"N 0d52'44.0625"W ]]> geo:mgrs Datatype for publishing a MGRS location Military Grid Reference System, 'http://en.wikipedia.org/wiki/Military_grid_reference_system'. ]]> \\d{1,2}[A-Za-z]\\s*[A-Za-z]{2}\\s*\\d{1,5}\\s*\\d{1,5} 38SMB4484 ]]>

As this document only defines semantics for existing protocol, additional schemas are not required.