%ents; ]>
User Location This specification defines an XMPP protocol extension for communicating information about the current geographical or physical location of an entity. &LEGALNOTICE; 0080 Draft Standards Track Standards XMPP Core XEP-0163 geoloc http://www.xmpp.org/schemas/geoloc.xsd &hildjj; &stpeter; 1.9 2015-12-01 ls

Added <altaccuracy/> element.

1.8 2014-05-07 ls

Added <tzo/> element.

1.7 2009-09-15 psa

Added <countrycode/> element.

1.6 2008-10-29 psa/jjh

Allowed empty geoloc element to signify a pause in publishing; added <accuracy/> element and deprecated <error/> element to change horizontal GPS error from arc minutes to meters, consistent with IMPS and other formats.

1.5 2008-01-30 jjh/psa

Added speed element.

1.4 2007-07-16 psa

Renamed to User Location; corrected pubsub examples; recommended pubsub/PEP as transport for location information about human users; added uri element.

1.3 2006-08-21 psa

Folded in civil location from XEP-0112.

1.2 2005-05-12 psa

Changed xs:string to xs:decimal for bearing and specified that bearing is to be interpreted as decimal degrees relative to true north.

1.1 2004-10-29 psa

Changed xs:int to xs:decimal for altitude; changed MUST NOT to SHOULD NOT regarding inferences about accuracy.

1.0 2004-10-12 psa

Per a vote of the Jabber Council, advanced status to Draft; also added internationalization considerations and linked to an archived version of the GPS datum example.

0.9 2004-10-12 psa

Clarified several points in the implementation notes.

0.8 2004-09-15 psa

Specified error flow for IQ example.

0.7 2004-04-25 psa

Corrected several errors; added reference to XEP-0033.

0.6 2004-02-19 psa

Reverted from infobits to geoloc elements; moved physical address protocol back to XEP-0112.

0.5 2003-12-16 psa

Converted to use of infobits.

0.4 2003-09-08 psa

Merged in contents of XEP-0112.

0.3 2003-08-21 psa

Changed protocol name from 'location' to 'geoloc'.

0.2 2003-07-29 psa

Incorporated Standards list feedback; changed document type to Informational.

0.1 2003-04-15 jjh

Initial version.

This document defines a format for capturing data about an entity's geographical location (geoloc). The format defined herein can describe most earthbound geographical locations, especially locations that may change fairly frequently. Potential uses for this approach include:

Geographical location is captured in terms of Global Positioning System (GPS) coordinates as well as civil location (city, street, building, etc.).

The format defined herein was designed to address the following requirements:

Information about the entity's location is provided by the entity and propagated on the network by the entity's associated application (usually a client). The information is structured by means of a <geoloc/> element that is qualified by the 'http://jabber.org/protocol/geoloc' namespace; the location information itself is provided as the XML character data of the following child elements:

Element Name Datatype Definition Example
accuracy xs:decimal Horizontal GPS error in meters; this element obsoletes the <error/> element 10
alt xs:decimal Altitude in meters above or below sea level 1609
altaccuracy xs:decimal Vertical GPS error in meters 10
area xs:string A named area such as a campus or neighborhood Central Park
bearing xs:decimal GPS bearing (direction in which the entity is heading to reach its next waypoint), measured in decimal degrees relative to true north It is the responsibility of the receiver to translate bearing into decimal degrees relative to magnetic north, if desired.  
building xs:string A specific building on a street or in an area The Empire State Building
country xs:string The nation where the user is located United States
countrycode xs:string The ISO 3166 two-letter country code US
datum xs:string GPS datum If datum is not included, receiver MUST assume WGS84; receivers MUST implement WGS84; senders MAY use another datum, but it is not recommended.  
description xs:string A natural-language name for or description of the location Bill's house
error xs:decimal Horizontal GPS error in arc minutes; this element is deprecated in favor of <accuracy/> 290.8882087
floor xs:string A particular floor in a building 102
lat xs:decimal Latitude in decimal degrees North 39.75
locality xs:string A locality within the administrative region, such as a town or city New York City
lon xs:decimal Longitude in decimal degrees East -104.99
postalcode xs:string A code used for postal delivery 10118
region xs:string An administrative region of the nation, such as a state or province New York
room xs:string A particular room in a building Observatory
speed xs:decimal The speed at which the entity is moving, in meters per second 52.69
street xs:string A thoroughfare within the locality, or a crossing of two thoroughfares 350 Fifth Avenue / 34th and Broadway
text xs:string A catch-all element that captures any other information about the location Northwest corner of the lobby
timestamp xs:dateTime UTC timestamp specifying the moment when the reading was taken (MUST conform to the DateTime profile of &xep0082;) 2004-02-19T21:12Z
tzo xs:string The time zone offset from UTC for the current location (MUST adhere to the Time Zone Definition (TZD) specified in &xep0082;) -07:00
uri xs:anyURI A URI or URL pointing to information about the location http://www.esbnyc.com/

NOTE: The datatypes specified above are defined in &w3xmlschema2;.

Location information about human users SHOULD be communicated and transported by means of &xep0060; or the subset thereof specified in &xep0163; (the examples below assume that the user's XMPP server supports PEP, thus the publish request lacks a 'to' address and the notification message has a 'from' address of the user's bare JID).

Although the XMPP publish-subscribe extension is the preferred means for transporting location information about human users, applications that do not involve human users (e.g., device tracking) MAY use other transport methods; however, because location information is not pure presence information and can change independently of network availability, it SHOULD NOT be provided as an extension to &PRESENCE;.

20 Italy 45.44 Venice 12.33 ]]> 20 Italy 45.44 Venice 12.33 ]]>

In order to indicate that the user is no longer publishing any location information, the user's client shall send an empty <geoloc/> element, which can be considered a "stop command" for geolocation:

]]> ]]>

Avoid "Mars probe" issues: as specified in Table 1, the units for <lat/> and <lon/> MUST be decimal degrees (where South and West are negative, North and East are positive), the units for <alt/> MUST be meters above or below sea level, and the units for <accuracy/> MUST be meters. The <accuracy/> element obsoletes the older <error/> element, which specified units of arc minutes intead of meters.

In applications where updates are sent whenever there is a certain distance change in location, those applications SHOULD account for time as well, to avoid rate-limiting when the user is (for example) on a jet plane. One possible way to do this would be to send updates at most once per minute of time (every time 60 seconds have elapsed).

Inferences SHOULD NOT be made about accuracy from the number of digits specified in the location or altitude.

Why the datum madness? See <http://www.xmpp.org/extensions/gps_datum.html> for an example.

An entity can provide a GPS path by publishing a series of items (i.e., multiple pubsub events) with appropriate values of the <timestamp/> element.

There are many XML data formats for physical location or address information. It is beyond the scope of this document to provide a mapping from the extension defined herein to every such format. However, it would be valuable to provide a mapping from the XMPP format to the formats used in other presence or extended presence protocols. The two main protocols of interest are:

  1. The Wireless Village (now "IMPS") specifications for mobile instant messaging; these specifications define a presence attribute for address information as encapsulated in the IMPS "Address" element The Wireless Village Initiative: Presence Attributes v1.1 (WV-029); for further information, visit <http://www.openmobilealliance.org/tech/affiliates/wv/wvindex.html>..

  2. The SIP-based SIMPLE specifications; in particular, the IETF's GEOPRIV Working Group has defined an extension to the IETF's &pidf; for location information, as specified in &rfc4119; (also known as "PIDF-LO").

The following table also maps the format defined herein to the vCard XML format specified in &xep0054;.

XMPP Wireless Village / IMPS SIMPLE (PIDF-LO) vCard XML
<country/> <Country/> <country/> <CTRY/> As noted in XEP-0054, the XML vCard format defined in draft-dawson-vcard-xml-dtd-01 specified a <COUNTRY/> element rather than a <CTRY/> element; refer to XEP-0054 for details.
<region/> -- <A1/> and/or <A2/> <REGION/>
<locality/> <City/> <A3/> <LOCALITY/>
<area/> <NamedArea/> <A4/> and/or <A5/> --
<street/> <Street/> The IMPS specification also enables one to define an intersection (e.g., "Broadway and 34th Street") as the combination of a <Crossing1/> element (e.g., "Broadway") and a <Crossing2/> element (e.g., "34th Street"). To map from IMPS to XMPP, an application SHOULD map such a combination to one XMPP <street/> element. <A6/> The PIDF-LO format provides information elements for much more granular control over a traditional street address; in PIDF-LO the <A6/> element is the street name only, and further information is provided in distinct elements for a leading street direction (e.g., "N"), trailing street suffix (e.g., "SW"), street suffix (e.g., "Avenue"), house number (e.g., "909"), and house number suffix (e.g., "1/2"). To map from PIDF-LO to XMPP, an application SHOULD construct the complete street address from the PIDF-LO elements (<A6/>, <PRD/>, <POD/>, <STS/>, <HNO/>, and <HNS/>) and map the result to one XMPP <street/> element. <STREET/>
<building/> <Building/> <LMK/> --
<floor/> -- <FLR/> --
<room/> -- -- --
<postalcode/> -- <PC/> <PCODE/>
<text/> <FreeTextLocation/> <LOC/> <EXTADR/>
<accuracy/> <Accuracy/> This element specifies accuracy in meters. When mapping from IMPS to XMPP, the IMPS <Accuracy/> element SHOULD be mapped to the XMPP <accuracy/> element (which specifies accuracy in meters), not the deprecated <error/> element (which specified accuracy in arc minutes). -- --
-- -- <NAM/> This element provides a name for the location, e.g., a certain store in a building. This SHOULD be mapped to the XMPP <text/> element. --

Because the character data contained in <geoloc/> child elements of type 'xs:string' is intended to be readable by humans, the <geoloc/> element SHOULD possess an 'xml:lang' attribute specifying the natural language of such character data.

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 &IANA;.

The ®ISTRAR; includes 'http://jabber.org/protocol/geoloc' to its registry of protocol namespaces.

The protocol documented by this schema is defined in XEP-0080: http://www.xmpp.org/extensions/xep-0080.html ]]>