draft-ietf-geopriv-uncertainty-04.txt   rfc7459.txt 
GEOPRIV M. Thomson Internet Engineering Task Force (IETF) M. Thomson
Internet-Draft Mozilla Request for Comments: 7459 Mozilla
Updates: 3693,4119,5491 (if approved) J. Winterbottom Updates: 3693, 4119, 5491 J. Winterbottom
Intended status: Standards Track Unaffiliated Category: Standards Track Unaffiliated
Expires: April 25, 2015 October 22, 2014 ISSN: 2070-1721 February 2015
Representation of Uncertainty and Confidence in PIDF-LO Representation of Uncertainty and Confidence in
draft-ietf-geopriv-uncertainty-04 the Presence Information Data Format Location Object (PIDF-LO)
Abstract Abstract
This document defines key concepts of uncertainty and confidence as This document defines key concepts of uncertainty and confidence as
they pertain to location information. Methods for the manipulation they pertain to location information. Methods for the manipulation
of location estimates that include uncertainty information are of location estimates that include uncertainty information are
outlined. outlined.
This document normatively updates the definition of location This document normatively updates the definition of location
information representations defined in RFC 4119 and RFC 5491. It information representations defined in RFCs 4119 and 5491. It also
also deprecates related terminology defined in RFC 3693. deprecates related terminology defined in RFC 3693.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This is an Internet Standards Track document.
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months This document is a product of the Internet Engineering Task Force
and may be updated, replaced, or obsoleted by other documents at any (IETF). It represents the consensus of the IETF community. It has
time. It is inappropriate to use Internet-Drafts as reference received public review and has been approved for publication by the
material or to cite them other than as "work in progress." Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 5741.
This Internet-Draft will expire on April 25, 2015. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc7459.
Copyright Notice Copyright Notice
Copyright (c) 2014 IETF Trust and the persons identified as the Copyright (c) 2015 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction ....................................................4
1.1. Conventions and Terminology . . . . . . . . . . . . . . . 3 1.1. Conventions and Terminology ................................4
2. A General Definition of Uncertainty . . . . . . . . . . . . . 4 2. A General Definition of Uncertainty .............................5
2.1. Uncertainty as a Probability Distribution . . . . . . . . 5 2.1. Uncertainty as a Probability Distribution ..................6
2.2. Deprecation of the Terms Precision and Resolution . . . . 7 2.2. Deprecation of the Terms "Precision" and "Resolution" ......8
2.3. Accuracy as a Qualitative Concept . . . . . . . . . . . . 7 2.3. Accuracy as a Qualitative Concept ..........................9
3. Uncertainty in Location . . . . . . . . . . . . . . . . . . . 8 3. Uncertainty in Location .........................................9
3.1. Targets as Points in Space . . . . . . . . . . . . . . . 8 3.1. Targets as Points in Space .................................9
3.2. Representation of Uncertainty and Confidence in PIDF-LO . 9 3.2. Representation of Uncertainty and Confidence in PIDF-LO ...10
3.3. Uncertainty and Confidence for Civic Addresses . . . . . 9 3.3. Uncertainty and Confidence for Civic Addresses ............10
3.4. DHCP Location Configuration Information and Uncertainty . 10 3.4. DHCP Location Configuration Information and Uncertainty ...11
4. Representation of Confidence in PIDF-LO . . . . . . . . . . . 10 4. Representation of Confidence in PIDF-LO ........................12
4.1. The "confidence" Element . . . . . . . . . . . . . . . . 11 4.1. The "confidence" Element ..................................13
4.2. Generating Locations with Confidence . . . . . . . . . . 12 4.2. Generating Locations with Confidence ......................13
4.3. Consuming and Presenting Confidence . . . . . . . . . . . 12 4.3. Consuming and Presenting Confidence .......................13
5. Manipulation of Uncertainty . . . . . . . . . . . . . . . . . 13 5. Manipulation of Uncertainty ....................................14
5.1. Reduction of a Location Estimate to a Point . . . . . . . 13 5.1. Reduction of a Location Estimate to a Point ...............15
5.1.1. Centroid Calculation . . . . . . . . . . . . . . . . 14 5.1.1. Centroid Calculation ...............................16
5.1.1.1. Arc-Band Centroid . . . . . . . . . . . . . . . . 14 5.1.1.1. Arc-Band Centroid .........................16
5.1.1.2. Polygon Centroid . . . . . . . . . . . . . . . . 15 5.1.1.2. Polygon Centroid ..........................16
5.2. Conversion to Circle or Sphere . . . . . . . . . . . . . 17 5.2. Conversion to Circle or Sphere ............................19
5.3. Three-Dimensional to Two-Dimensional Conversion . . . . . 18 5.3. Conversion from Three-Dimensional to Two-Dimensional ......20
5.4. Increasing and Decreasing Uncertainty and Confidence . . 19 5.4. Increasing and Decreasing Uncertainty and Confidence ......20
5.4.1. Rectangular Distributions . . . . . . . . . . . . . . 19 5.4.1. Rectangular Distributions ..........................21
5.4.2. Normal Distributions . . . . . . . . . . . . . . . . 20 5.4.2. Normal Distributions ...............................21
5.5. Determining Whether a Location is Within a Given Region . 20 5.5. Determining Whether a Location Is within a Given Region ...22
5.5.1. Determining the Area of Overlap for Two Circles . . . 22 5.5.1. Determining the Area of Overlap for Two Circles ....24
5.5.2. Determining the Area of Overlap for Two Polygons . . 23 5.5.2. Determining the Area of Overlap for Two Polygons ...25
6. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 23 6. Examples .......................................................25
6.1. Reduction to a Point or Circle . . . . . . . . . . . . . 23 6.1. Reduction to a Point or Circle ............................25
6.2. Increasing and Decreasing Confidence . . . . . . . . . . 27 6.2. Increasing and Decreasing Confidence ......................29
6.3. Matching Location Estimates to Regions of Interest . . . 27 6.3. Matching Location Estimates to Regions of Interest ........29
6.4. PIDF-LO With Confidence Example . . . . . . . . . . . . . 28 6.4. PIDF-LO with Confidence Example ...........................30
7. Confidence Schema . . . . . . . . . . . . . . . . . . . . . . 28 7. Confidence Schema ..............................................31
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 30 8. IANA Considerations ............................................32
8.1. URN Sub-Namespace Registration for 8.1. URN Sub-Namespace Registration for ........................32
urn:ietf:params:xml:ns:geopriv:conf . . . . . . . . . . . 30 8.2. XML Schema Registration ...................................33
8.2. XML Schema Registration . . . . . . . . . . . . . . . . . 30 9. Security Considerations ........................................33
9. Security Considerations . . . . . . . . . . . . . . . . . . . 31 10. References ....................................................34
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 31 10.1. Normative References .....................................34
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 31 10.2. Informative References ...................................35
11.1. Normative References . . . . . . . . . . . . . . . . . . 31
11.2. Informative References . . . . . . . . . . . . . . . . . 32 Appendix A. Conversion between Cartesian and Geodetic
Appendix A. Conversion Between Cartesian and Geodetic Coordinates in WGS84 ..................................36
Coordinates in WGS84 . . . . . . . . . . . . . . . . 33 Appendix B. Calculating the Upward Normal of a Polygon ............37
Appendix B. Calculating the Upward Normal of a Polygon . . . . . 34 B.1. Checking That a Polygon Upward Normal Points Up ...........38
B.1. Checking that a Polygon Upward Normal Points Up . . . . . 35 Acknowledgements ..................................................39
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 36 Authors' Addresses ................................................39
1. Introduction 1. Introduction
Location information represents an estimation of the position of a Location information represents an estimation of the position of a
Target [RFC6280]. Under ideal circumstances, a location estimate Target [RFC6280]. Under ideal circumstances, a location estimate
precisely reflects the actual location of the Target. For automated precisely reflects the actual location of the Target. For automated
systems that determine location, there are many factors that systems that determine location, there are many factors that
introduce errors into the measurements that are used to determine introduce errors into the measurements that are used to determine
location estimates. location estimates.
skipping to change at page 3, line 45 skipping to change at page 4, line 45
described. These methods are simplified by making certain described. These methods are simplified by making certain
assumptions about the location estimate and are designed to be assumptions about the location estimate and are designed to be
applicable to location estimates in a relatively small geographic applicable to location estimates in a relatively small geographic
area. area.
A confidence extension for the Presence Information Data Format - A confidence extension for the Presence Information Data Format -
Location Object (PIDF-LO) [RFC4119] is described. Location Object (PIDF-LO) [RFC4119] is described.
This document describes methods that can be used in combination with This document describes methods that can be used in combination with
automatically determined location information. These are automatically determined location information. These are
statistically-based methods. statistically based methods.
1.1. Conventions and Terminology 1.1. Conventions and Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119]. document are to be interpreted as described in [RFC2119].
This document assumes a basic understanding of the principles of This document assumes a basic understanding of the principles of
mathematics, particularly statistics and geometry. mathematics, particularly statistics and geometry.
Some terminology is borrowed from [RFC3693] and [RFC6280], in Some terminology is borrowed from [RFC3693] and [RFC6280], in
particular Target. particular "Target".
Mathematical formulae are presented using the following notation: add Mathematical formulae are presented using the following notation: add
"+", subtract "-", multiply "*", divide "/", power "^" and absolute "+", subtract "-", multiply "*", divide "/", power "^", and absolute
value "|x|". Precedence follows established conventions: power value "|x|". Precedence follows established conventions: power
operations precede multiply and divide, multiply and divide precede operations precede multiply and divide, multiply and divide precede
add and subtract, and parentheses are used to indicate operations add and subtract, and parentheses are used to indicate operations
that are applied together. Mathematical functions are represented by that are applied together. Mathematical functions are represented by
common abbreviations: square root "sqrt(x)", sine "sin(x)", cosine common abbreviations: square root "sqrt(x)", sine "sin(x)", cosine
"cos(x)", inverse cosine "acos(x)", tangent "tan(x)", inverse tangent "cos(x)", inverse cosine "acos(x)", tangent "tan(x)", inverse tangent
"atan(x)", two-argument inverse tangent "atan2(y,x)", error function "atan(x)", two-argument inverse tangent "atan2(y,x)", error function
"erf(x)", and inverse error function "erfinv(x)". "erf(x)", and inverse error function "erfinv(x)".
2. A General Definition of Uncertainty 2. A General Definition of Uncertainty
skipping to change at page 4, line 35 skipping to change at page 5, line 35
measuring any observable quantity, errors from a range of sources measuring any observable quantity, errors from a range of sources
affect the result. Uncertainty is a quantification of what is known affect the result. Uncertainty is a quantification of what is known
about the observed quantity, either through the limitations of about the observed quantity, either through the limitations of
measurement or through inherent variability of the quantity. measurement or through inherent variability of the quantity.
Uncertainty is most completely described by a probability Uncertainty is most completely described by a probability
distribution. A probability distribution assigns a probability to distribution. A probability distribution assigns a probability to
possible values for the quantity. possible values for the quantity.
A probability distribution describing a measured quantity can be A probability distribution describing a measured quantity can be
arbitrarily complex and so it is desirable to find a simplified arbitrarily complex, so it is desirable to find a simplified model.
model. One approach commonly taken is to reduce the probability One approach commonly taken is to reduce the probability distribution
distribution to a confidence interval. Many alternative models are to a confidence interval. Many alternative models are used in other
used in other areas, but study of those is not the focus of this areas, but study of those is not the focus of this document.
document.
In addition to the central estimate of the observed quantity, a In addition to the central estimate of the observed quantity, a
confidence interval is succinctly described by two values: an error confidence interval is succinctly described by two values: an error
range and a confidence. The error range describes an interval and range and a confidence. The error range describes an interval and
the confidence describes an estimated upper bound on the probability the confidence describes an estimated upper bound on the probability
that a "true" value is found within the extents defined by the error. that a "true" value is found within the extents defined by the error.
In the following example, a measurement result for a length is shown In the following example, a measurement result for a length is shown
as a nominal value with additional information on error range (0.0043 as a nominal value with additional information on error range (0.0043
meters) and confidence (95%). meters) and confidence (95%).
e.g. x = 1.00742 +/- 0.0043 meters at 95% confidence e.g., x = 1.00742 +/- 0.0043 meters at 95% confidence
This result indicates that the measurement indicates that the value This measurement result indicates that the value of "x" is between
of "x" between 1.00312 and 1.01172 meters with 95% probability. No 1.00312 and 1.01172 meters with 95% probability. No other assertion
other assertion is made: in particular, this does not assert that x is made: in particular, this does not assert that x is 1.00742.
is 1.00742.
Uncertainty and confidence for location estimates can be derived in a Uncertainty and confidence for location estimates can be derived in a
number of ways. This document does not attempt to enumerate the many number of ways. This document does not attempt to enumerate the many
methods for determining uncertainty. [ISO.GUM] and [NIST.TN1297] methods for determining uncertainty. [ISO.GUM] and [NIST.TN1297]
provide a set of general guidelines for determining and manipulating provide a set of general guidelines for determining and manipulating
measurement uncertainty. This document applies that general guidance measurement uncertainty. This document applies that general guidance
for consumers of location information. for consumers of location information.
As a statistical measure, values determined for uncertainty are As a statistical measure, values determined for uncertainty are found
determined based on information in the aggregate, across numerous based on information in the aggregate, across numerous individual
individual estimates. An individual estimate might be determined to estimates. An individual estimate might be determined to be
be "correct" - by using a survey to validate the result, for example "correct" -- for example, by using a survey to validate the result --
- without invalidating the statistical assertion. without invalidating the statistical assertion.
This understanding of estimates in the statistical sense explains why This understanding of estimates in the statistical sense explains why
asserting a confidence of 100%, which might seem intuitively correct, asserting a confidence of 100%, which might seem intuitively correct,
is rarely advisable. is rarely advisable.
2.1. Uncertainty as a Probability Distribution 2.1. Uncertainty as a Probability Distribution
The Probability Density Function (PDF) that is described by The Probability Density Function (PDF) that is described by
uncertainty indicates the probability that the "true" value lies at uncertainty indicates the probability that the "true" value lies at
any one point. The shape of the probability distribution can vary any one point. The shape of the probability distribution can vary
skipping to change at page 6, line 6 skipping to change at page 7, line 6
often described by the half-width of the distribution; that is, often described by the half-width of the distribution; that is,
half the width of the distribution. half the width of the distribution.
Each of these probability density functions can be characterized by Each of these probability density functions can be characterized by
its center point, or mean, and its width. For a normal distribution, its center point, or mean, and its width. For a normal distribution,
uncertainty and confidence together are related to the standard uncertainty and confidence together are related to the standard
deviation of the function (see Section 5.4). For a rectangular deviation of the function (see Section 5.4). For a rectangular
distribution, the half-width of the distribution is used. distribution, the half-width of the distribution is used.
Figure 1 shows a normal and rectangular probability density function Figure 1 shows a normal and rectangular probability density function
with the mean (m) and standard deviation (s) labelled. The half- with the mean (m) and standard deviation (s) labeled. The half-width
width (h) of the rectangular distribution is also indicated. (h) of the rectangular distribution is also indicated.
***** *** Normal PDF ***** *** Normal PDF
** : ** --- Rectangular PDF ** : ** --- Rectangular PDF
** : ** ** : **
** : ** ** : **
.---------*---------------*---------. .---------*---------------*---------.
| ** : ** | | ** : ** |
| ** : ** | | ** : ** |
| * <-- s -->: * | | * <-- s -->: * |
| * : : : * | | * : : : * |
skipping to change at page 7, line 30 skipping to change at page 8, line 34
***** |:::::::::::::::::::::::::::::| ***** ***** |:::::::::::::::::::::::::::::| *****
.****..........!:::::::::::::::::::::::::::::!..........*****. .****..........!:::::::::::::::::::::::::::::!..........*****.
| | | | | |
(m-u) m (m+u) (m-u) m (m+u)
Figure 2: Confidence as the Integral of a PDF Figure 2: Confidence as the Integral of a PDF
In Section 5.4, methods are described for manipulating uncertainty if In Section 5.4, methods are described for manipulating uncertainty if
the shape of the PDF is known. the shape of the PDF is known.
2.2. Deprecation of the Terms Precision and Resolution 2.2. Deprecation of the Terms "Precision" and "Resolution"
The terms _Precision_ and _Resolution_ are defined in RFC 3693 The terms "Precision" and "Resolution" are defined in RFC 3693
[RFC3693]. These definitions were intended to provide a common [RFC3693]. These definitions were intended to provide a common
nomenclature for discussing uncertainty; however, these particular nomenclature for discussing uncertainty; however, these particular
terms have many different uses in other fields and their definitions terms have many different uses in other fields, and their definitions
are not sufficient to avoid confusion about their meaning. These are not sufficient to avoid confusion about their meaning. These
terms are unsuitable for use in relation to quantitative concepts terms are unsuitable for use in relation to quantitative concepts
when discussing uncertainty and confidence in relation to location when discussing uncertainty and confidence in relation to location
information. information.
2.3. Accuracy as a Qualitative Concept 2.3. Accuracy as a Qualitative Concept
Uncertainty is a quantitative concept. The term _accuracy_ is useful Uncertainty is a quantitative concept. The term "accuracy" is useful
in describing, qualitatively, the general concepts of location in describing, qualitatively, the general concepts of location
information. Accuracy is generally useful when describing information. Accuracy is generally useful when describing
qualitative aspects of location estimates. Accuracy is not a qualitative aspects of location estimates. Accuracy is not a
suitable term for use in a quantitative context. suitable term for use in a quantitative context.
For instance, it could be appropriate to say that a location estimate For instance, it could be appropriate to say that a location estimate
with uncertainty "X" is more accurate than a location estimate with with uncertainty "X" is more accurate than a location estimate with
uncertainty "2X" at the same confidence. It is not appropriate to uncertainty "2X" at the same confidence. It is not appropriate to
assign a number to "accuracy", nor is it appropriate to refer to any assign a number to "accuracy", nor is it appropriate to refer to any
component of uncertainty or confidence as "accuracy". That is, to component of uncertainty or confidence as "accuracy". That is,
say that the "accuracy" for the first location estimate is "X" would saying the "accuracy" for the first location estimate is "X" would be
be an erroneous use of this term. an erroneous use of this term.
3. Uncertainty in Location 3. Uncertainty in Location
A _location estimate_ is the result of location determination. A A "location estimate" is the result of location determination. A
location estimate is subject to uncertainty like any other location estimate is subject to uncertainty like any other
observation. However, unlike a simple measure of a one dimensional observation. However, unlike a simple measure of a one dimensional
property like length, a location estimate is specified in two or property like length, a location estimate is specified in two or
three dimensions. three dimensions.
Uncertainty in two or three dimensional locations can be described Uncertainty in two- or three-dimensional locations can be described
using confidence intervals. The confidence interval for a location using confidence intervals. The confidence interval for a location
estimate in two or three dimensional space is expressed as a subset estimate in two- or three-dimensional space is expressed as a subset
of that space. This document uses the term _region of uncertainty_ of that space. This document uses the term "region of uncertainty"
to refer to the area or volume that describes the confidence to refer to the area or volume that describes the confidence
interval. interval.
Areas or volumes that describe regions of uncertainty can be formed Areas or volumes that describe regions of uncertainty can be formed
by the combination of two or three one-dimensional ranges, or more by the combination of two or three one-dimensional ranges, or more
complex shapes could be described (for example, the shapes in complex shapes could be described (for example, the shapes in
[RFC5491]). [RFC5491]).
3.1. Targets as Points in Space 3.1. Targets as Points in Space
This document makes a simplifying assumption that the Target of the This document makes a simplifying assumption that the Target of the
PIDF-LO occupies just a single point in space. While this is clearly PIDF-LO occupies just a single point in space. While this is clearly
false in virtually all scenarios with any practical application, it false in virtually all scenarios with any practical application, it
is often a reasonable simplifying assumption to make. is often a reasonable simplifying assumption to make.
To a large extent, whether this simplification is valid depends on To a large extent, whether this simplification is valid depends on
the size of the target relative to the size of the uncertainty the size of the Target relative to the size of the uncertainty
region. When locating a personal device using contemporary location region. When locating a personal device using contemporary location
determination techniques, the space the device occupies relative to determination techniques, the space the device occupies relative to
the uncertainty is proportionally quite small. Even where that the uncertainty is proportionally quite small. Even where that
device is used as a proxy for a person, the proportions change device is used as a proxy for a person, the proportions change
little. little.
This assumption is less useful as uncertainty becomes small relative This assumption is less useful as uncertainty becomes small relative
to the size of the Target of the PIDF-LO (or conversely, as to the size of the Target of the PIDF-LO (or conversely, as
uncertainty becomes small relative to the Target). For instance, uncertainty becomes small relative to the Target). For instance,
describing the location of a football stadium or small country would describing the location of a football stadium or small country would
include a region of uncertainty that is only slightly larger than the include a region of uncertainty that is only slightly larger than the
Target itself. In these cases, much of the guidance in this document Target itself. In these cases, much of the guidance in this document
is not applicable. Indeed, as the accuracy of location determination is not applicable. Indeed, as the accuracy of location determination
technology improves, it could be that the advice this document technology improves, it could be that the advice this document
contains becomes less relevant by the same measure. contains becomes less relevant by the same measure.
3.2. Representation of Uncertainty and Confidence in PIDF-LO 3.2. Representation of Uncertainty and Confidence in PIDF-LO
A set of shapes suitable for the expression of uncertainty in A set of shapes suitable for the expression of uncertainty in
location estimates in the Presence Information Data Format - Location location estimates in the PIDF-LO are described in [GeoShape]. These
Object (PIDF-LO) are described in [GeoShape]. These shapes are the shapes are the recommended form for the representation of uncertainty
recommended form for the representation of uncertainty in PIDF-LO in PIDF-LO [RFC4119] documents.
[RFC4119] documents.
The PIDF-LO can contain uncertainty, but does not include an The PIDF-LO can contain uncertainty, but it does not include an
indication of confidence. [RFC5491] defines a fixed value of 95%. indication of confidence. [RFC5491] defines a fixed value of 95%.
Similarly, the PIDF-LO format does not provide an indication of the Similarly, the PIDF-LO format does not provide an indication of the
shape of the PDF. Section 4 defines elements to convey this shape of the PDF. Section 4 defines elements to convey this
information in PIDF-LO. information in PIDF-LO.
Absence of uncertainty information in a PIDF-LO document does not Absence of uncertainty information in a PIDF-LO document does not
indicate that there is no uncertainty in the location estimate. indicate that there is no uncertainty in the location estimate.
Uncertainty might not have been calculated for the estimate, or it Uncertainty might not have been calculated for the estimate, or it
may be withheld for privacy purposes. may be withheld for privacy purposes.
If the Point shape is used, confidence and uncertainty are unknown; a If the Point shape is used, confidence and uncertainty are unknown; a
receiver can either assume a confidence of 0% or infinite receiver can either assume a confidence of 0% or infinite
uncertainty. The same principle applies on the altitude axis for uncertainty. The same principle applies on the altitude axis for
two-dimension shapes like the Circle. two-dimensional shapes like the Circle.
3.3. Uncertainty and Confidence for Civic Addresses 3.3. Uncertainty and Confidence for Civic Addresses
Automatically determined civic addresses [RFC5139] inherently include Automatically determined civic addresses [RFC5139] inherently include
uncertainty, based on the area of the most precise element that is uncertainty, based on the area of the most precise element that is
specified. In this case, uncertainty is effectively described by the specified. In this case, uncertainty is effectively described by the
presence or absence of elements. To the recipient of location presence or absence of elements. To the recipient of location
information, elements that are not present are uncertain. information, elements that are not present are uncertain.
To apply the concept of uncertainty to civic addresses, it is helpful To apply the concept of uncertainty to civic addresses, it is helpful
skipping to change at page 10, line 17 skipping to change at page 11, line 30
that type are excluded. For non-orthogonal partitions, only the that type are excluded. For non-orthogonal partitions, only the
portion of the partition that fits within the existing space is portion of the partition that fits within the existing space is
selected. This is what distinguishes King Street in Sydney from King selected. This is what distinguishes King Street in Sydney from King
Street in Melbourne. Each defined element selects a partition of Street in Melbourne. Each defined element selects a partition of
space. The resulting location is the intersection of all selected space. The resulting location is the intersection of all selected
spaces. spaces.
The resulting spatial partition can be considered as a region of The resulting spatial partition can be considered as a region of
uncertainty. uncertainty.
Note: This view is a potential perspective on the process of geo- Note: This view is a potential perspective on the process of
coding - the translation of a civic address to a geodetic geocoding -- the translation of a civic address to a geodetic
location. location.
Uncertainty in civic addresses can be increased by removing elements. Uncertainty in civic addresses can be increased by removing elements.
This does not increase confidence unless additional information is This does not increase confidence unless additional information is
used. Similarly, arbitrarily increasing uncertainty in a geodetic used. Similarly, arbitrarily increasing uncertainty in a geodetic
location does not increase confidence. location does not increase confidence.
3.4. DHCP Location Configuration Information and Uncertainty 3.4. DHCP Location Configuration Information and Uncertainty
Location information is often measured in two or three dimensions; Location information is often measured in two or three dimensions;
expressions of uncertainty in one dimension only are rare. The expressions of uncertainty in one dimension only are rare. The
"resolution" parameters in [RFC6225] provide an indication of how "resolution" parameters in [RFC6225] provide an indication of how
many bits of a number are valid, which could be interpreted as an many bits of a number are valid, which could be interpreted as an
expression of uncertainty in one dimension. expression of uncertainty in one dimension.
[RFC6225] defines a means for representing uncertainty, but a value [RFC6225] defines a means for representing uncertainty, but a value
for confidence is not specified. A default value of 95% confidence for confidence is not specified. A default value of 95% confidence
should be assumed for the combination of the uncertainty on each should be assumed for the combination of the uncertainty on each
axis. This is consistent with the transformation of those forms into axis. This is consistent with the transformation of those forms into
the uncertainty representations from [RFC5491]. That is, the the uncertainty representations from [RFC5491]. That is, the
confidence of the resultant rectangular polygon or prism is assumed confidence of the resultant rectangular Polygon or Prism is assumed
to be 95%. to be 95%.
4. Representation of Confidence in PIDF-LO 4. Representation of Confidence in PIDF-LO
On the whole, a fixed definition for confidence is preferable, On the whole, a fixed definition for confidence is preferable,
primarily because it ensures consistency between implementations. primarily because it ensures consistency between implementations.
Location generators that are aware of this constraint can generate Location generators that are aware of this constraint can generate
location information at the required confidence. Location recipients location information at the required confidence. Location recipients
are able to make sensible assumptions about the quality of the are able to make sensible assumptions about the quality of the
information that they receive. information that they receive.
In some circumstances - particularly with pre-existing systems - In some circumstances -- particularly with preexisting systems --
location generators might be unable to provide location information location generators might be unable to provide location information
with consistent confidence. Existing systems sometimes specify with consistent confidence. Existing systems sometimes specify
confidence at 38%, 67% or 90%. Existing forms of expressing location confidence at 38%, 67%, or 90%. Existing forms of expressing
information, such as that defined in [TS-3GPP-23_032], contain location information, such as that defined in [TS-3GPP-23_032],
elements that express the confidence in the result. contain elements that express the confidence in the result.
The addition of a confidence element provides information that was The addition of a confidence element provides information that was
previously unavailable to recipients of location information. previously unavailable to recipients of location information.
Without this information, a location server or generator that has Without this information, a location server or generator that has
access to location information with a confidence lower than 95% has access to location information with a confidence lower than 95% has
two options: two options:
o The location server can scale regions of uncertainty in an attempt o The location server can scale regions of uncertainty in an attempt
to acheive 95% confidence. This scaling process significantly to achieve 95% confidence. This scaling process significantly
degrades the quality of the information, because the location degrades the quality of the information, because the location
server might not have the necessary information to scale server might not have the necessary information to scale
appropriately; the location server is forced to make assumptions appropriately; the location server is forced to make assumptions
that are likely to result in either an overly conservative that are likely to result in either an overly conservative
estimate with high uncertainty or a overestimate of confidence. estimate with high uncertainty or an overestimate of confidence.
o The location server can ignore the confidence entirely, which o The location server can ignore the confidence entirely, which
results in giving the recipient a false impression of its quality. results in giving the recipient a false impression of its quality.
Both of these choices degrade the quality of the information Both of these choices degrade the quality of the information
provided. provided.
The addition of a confidence element avoids this problem entirely if The addition of a confidence element avoids this problem entirely if
a location recipient supports and understands the element. A a location recipient supports and understands the element. A
recipient that does not understand - and hence ignores - the recipient that does not understand -- and, hence, ignores -- the
confidence element is in no worse a position than if the location confidence element is in no worse a position than if the location
server ignored confidence. server ignored confidence.
4.1. The "confidence" Element 4.1. The "confidence" Element
The confidence element MAY be added to the "location-info" element of The "confidence" element MAY be added to the "location-info" element
the Presence Information Data Format - Location Object (PIDF-LO) of the PIDF-LO [RFC4119] document. This element expresses the
[RFC4119] document. This element expresses the confidence in the confidence in the associated location information as a percentage. A
associated location information as a percentage. A special "unknown" special "unknown" value is reserved to indicate that confidence is
value is reserved to indicate that confidence is supported, but not supported, but not known to the Location Generator.
known to the Location Generator.
The confidence element optionally includes an attribute that The "confidence" element optionally includes an attribute that
indicates the shape of the probability density function (PDF) of the indicates the shape of the PDF of the associated region of
associated region of uncertainty. Three values are possible: uncertainty. Three values are possible: unknown, normal, and
unknown, normal and rectangular. rectangular.
Indicating a particular PDF only indicates that the distribution Indicating a particular PDF only indicates that the distribution
approximately fits the given shape based on the methods used to approximately fits the given shape based on the methods used to
generate the location information. The PDF is normal if there are a generate the location information. The PDF is normal if there are a
large number of small, independent sources of error; rectangular if large number of small, independent sources of error. It is
all points within the area have roughly equal probability of being rectangular if all points within the area have roughly equal
the actual location of the Target; otherwise, the PDF MUST either be probability of being the actual location of the Target. Otherwise,
set to unknown or omitted. the PDF MUST either be set to unknown or omitted.
If a PIDF-LO does not include the confidence element, the confidence If a PIDF-LO does not include the confidence element, the confidence
of the location estimate is 95%, as defined in [RFC5491]. of the location estimate is 95%, as defined in [RFC5491].
A Point shape does not have uncertainty (or it has infinite A Point shape does not have uncertainty (or it has infinite
uncertainty), so confidence is meaningless for a point; therefore, uncertainty), so confidence is meaningless for a Point; therefore,
this element MUST be omitted if only a point is provided. this element MUST be omitted if only a Point is provided.
4.2. Generating Locations with Confidence 4.2. Generating Locations with Confidence
Location generators SHOULD attempt to ensure that confidence is equal Location generators SHOULD attempt to ensure that confidence is equal
in each dimension when generating location information. This in each dimension when generating location information. This
restriction, while not always practical, allows for more accurate restriction, while not always practical, allows for more accurate
scaling, if scaling is necessary. scaling, if scaling is necessary.
A confidence element MUST be included with all location information A confidence element MUST be included with all location information
that includes uncertainty (that is, all forms other than a point). A that includes uncertainty (that is, all forms other than a Point). A
special "unknown" is used if confidence is not known. special "unknown" is used if confidence is not known.
4.3. Consuming and Presenting Confidence 4.3. Consuming and Presenting Confidence
The inclusion of confidence that is anything other than 95% presents The inclusion of confidence that is anything other than 95% presents
a potentially difficult usability problem for applications that use a potentially difficult usability problem for applications that use
location information. Effectively communicating the probability that location information. Effectively communicating the probability that
a location is incorrect to a user can be difficult. a location is incorrect to a user can be difficult.
It is inadvisable to simply display locations of any confidence, or It is inadvisable to simply display locations of any confidence, or
to display confidence in a separate or non-obvious fashion. If to display confidence in a separate or non-obvious fashion. If
locations with different confidence levels are displayed such that locations with different confidence levels are displayed such that
the distinction is subtle or easy to overlook - such as using fine the distinction is subtle or easy to overlook -- such as using fine
graduations of color or transparency for graphical uncertainty graduations of color or transparency for graphical uncertainty
regions, or displaying uncertainty graphically, but providing regions or displaying uncertainty graphically, but providing
confidence as supplementary text - a user could fail to notice a confidence as supplementary text -- a user could fail to notice a
difference in the quality of the location information that might be difference in the quality of the location information that might be
significant. significant.
Depending on the circumstances, different ways of handling confidence Depending on the circumstances, different ways of handling confidence
might be appropriate. Section 5 describes techniques that could be might be appropriate. Section 5 describes techniques that could be
appropriate for consumers that use automated processing. appropriate for consumers that use automated processing.
Providing that the full implications of any choice for the Providing that the full implications of any choice for the
application are understood, some amount of automated processing could application are understood, some amount of automated processing could
be appropriate. In a simple example, applications could choose to be appropriate. In a simple example, applications could choose to
discard or suppress the display of location information if confidence discard or suppress the display of location information if confidence
does not meet a pre-determined threshold. does not meet a predetermined threshold.
In settings where there is an opportunity for user training, some of In settings where there is an opportunity for user training, some of
these problems might be mitigated by defining different operational these problems might be mitigated by defining different operational
procedures for handling location information at different confidence procedures for handling location information at different confidence
levels. levels.
5. Manipulation of Uncertainty 5. Manipulation of Uncertainty
This section deals with manipulation of location information that This section deals with manipulation of location information that
contains uncertainty. contains uncertainty.
The following rules generally apply when manipulating location The following rules generally apply when manipulating location
information: information:
o Where calculations are performed on coordinate information, these o Where calculations are performed on coordinate information, these
should be performed in Cartesian space and the results converted should be performed in Cartesian space and the results converted
back to latitude, longitude and altitude. A method for converting back to latitude, longitude, and altitude. A method for
to and from Cartesian coordinates is included in Appendix A. converting to and from Cartesian coordinates is included in
Appendix A.
While some approximation methods are useful in simplifying While some approximation methods are useful in simplifying
calculations, treating latitude and longitude as Cartesian axes calculations, treating latitude and longitude as Cartesian axes
is never advisable. The two axes are not orthogonal. Errors is never advisable. The two axes are not orthogonal. Errors
can arise from the curvature of the earth and from the can arise from the curvature of the earth and from the
convergence of longitude lines. convergence of longitude lines.
o Normal rounding rules do not apply when rounding uncertainty. o Normal rounding rules do not apply when rounding uncertainty.
When rounding, the region of uncertainty always increases (that When rounding, the region of uncertainty always increases (that
is, errors are rounded up) and confidence is always rounded down is, errors are rounded up) and confidence is always rounded down
skipping to change at page 14, line 5 skipping to change at page 15, line 27
This section describes algorithms for reducing location estimates to This section describes algorithms for reducing location estimates to
a simple form without uncertainty information. Having a consistent a simple form without uncertainty information. Having a consistent
means for reducing location estimates allows for interaction between means for reducing location estimates allows for interaction between
applications that are able to use uncertainty information and those applications that are able to use uncertainty information and those
that cannot. that cannot.
Note: Reduction of a location estimate to a point constitutes a Note: Reduction of a location estimate to a point constitutes a
reduction in information. Removing uncertainty information can reduction in information. Removing uncertainty information can
degrade results in some applications. Also, there is a natural degrade results in some applications. Also, there is a natural
tendency to misinterpret a point location as representing a tendency to misinterpret a Point location as representing a
location without uncertainty. This could lead to more serious location without uncertainty. This could lead to more serious
errors. Therefore, these algorithms should only be applied where errors. Therefore, these algorithms should only be applied where
necessary. necessary.
Several different approaches can be taken when reducing a location Several different approaches can be taken when reducing a location
estimate to a point. Different methods each make a set of estimate to a point. Different methods each make a set of
assumptions about the properties of the PDF and the selected point; assumptions about the properties of the PDF and the selected point;
no one method is more "correct" than any other. For any given region no one method is more "correct" than any other. For any given region
of uncertainty, selecting an arbitrary point within the area could be of uncertainty, selecting an arbitrary point within the area could be
considered valid; however, given the aforementioned problems with considered valid; however, given the aforementioned problems with
point locations, a more rigorous approach is appropriate. Point locations, a more rigorous approach is appropriate.
Given a result with a known distribution, selecting the point within Given a result with a known distribution, selecting the point within
the area that has the highest probability is a more rigorous method. the area that has the highest probability is a more rigorous method.
Alternatively, a point could be selected that minimizes the overall Alternatively, a point could be selected that minimizes the overall
error; that is, it minimizes the expected value of the difference error; that is, it minimizes the expected value of the difference
between the selected point and the "true" value. between the selected point and the "true" value.
If a rectangular distribution is assumed, the centroid of the area or If a rectangular distribution is assumed, the centroid of the area or
volume minimizes the overall error. Minimizing the error for a volume minimizes the overall error. Minimizing the error for a
normal distribution is mathematically complex. Therefore, this normal distribution is mathematically complex. Therefore, this
document opts to select the centroid of the region of uncertainty document opts to select the centroid of the region of uncertainty
when selecting a point. when selecting a point.
5.1.1. Centroid Calculation 5.1.1. Centroid Calculation
For regular shapes, such as Circle, Sphere, Ellipse and Ellipsoid, For regular shapes, such as Circle, Sphere, Ellipse, and Ellipsoid,
this approach equates to the center point of the region. For regions this approach equates to the center point of the region. For regions
of uncertainty that are expressed as regular Polygons and Prisms the of uncertainty that are expressed as regular Polygons and Prisms, the
center point is also the most appropriate selection. center point is also the most appropriate selection.
For the Arc-Band shape and non-regular Polygons and Prisms, selecting For the Arc-Band shape and non-regular Polygons and Prisms, selecting
the centroid of the area or volume minimizes the overall error. This the centroid of the area or volume minimizes the overall error. This
assumes that the PDF is rectangular. assumes that the PDF is rectangular.
Note: The centroid of a concave Polygon or Arc-Band shape is not Note: The centroid of a concave Polygon or Arc-Band shape is not
necessarily within the region of uncertainty. necessarily within the region of uncertainty.
5.1.1.1. Arc-Band Centroid 5.1.1.1. Arc-Band Centroid
skipping to change at page 15, line 27 skipping to change at page 16, line 49
The method described in this section is simplified by assuming The method described in this section is simplified by assuming
that the surface of the earth is locally flat. This method that the surface of the earth is locally flat. This method
degrades as polygons become larger; see [GeoShape] for degrades as polygons become larger; see [GeoShape] for
recommendations on polygon size. recommendations on polygon size.
The polygon is translated to a new coordinate system that has an x-y The polygon is translated to a new coordinate system that has an x-y
plane roughly parallel to the polygon. This enables the elimination plane roughly parallel to the polygon. This enables the elimination
of z-axis values and calculating a centroid can be done using only x of z-axis values and calculating a centroid can be done using only x
and y coordinates. This requires that the upward normal for the and y coordinates. This requires that the upward normal for the
polygon is known. polygon be known.
To translate the polygon coordinates, apply the process described in To translate the polygon coordinates, apply the process described in
Appendix B to find the normal vector "N = [Nx,Ny,Nz]". This value Appendix B to find the normal vector "N = [Nx,Ny,Nz]". This value
should be made a unit vector to ensure that the transformation matrix should be made a unit vector to ensure that the transformation matrix
is a special orthogonal matrix. From this vector, select two vectors is a special orthogonal matrix. From this vector, select two vectors
that are perpendicular to this vector and combine these into a that are perpendicular to this vector and combine these into a
transformation matrix. transformation matrix.
If "Nx" and "Ny" are non-zero, the matrices in Figure 3 can be used, If "Nx" and "Ny" are non-zero, the matrices in Figure 3 can be used,
given "p = sqrt(Nx^2 + Ny^2)". More transformations are provided given "p = sqrt(Nx^2 + Ny^2)". More transformations are provided
skipping to change at page 16, line 39 skipping to change at page 18, line 14
For these formulae, treat each set of coordinates as circular, that For these formulae, treat each set of coordinates as circular, that
is "x'[0] == x'[n]" and "x'[n+1] == x'[1]". Based on the area, the is "x'[0] == x'[n]" and "x'[n+1] == x'[1]". Based on the area, the
centroid along each axis can be determined by: centroid along each axis can be determined by:
Cx' = sum (x'[i]+x'[i+1]) * (x'[i]*y'[i+1]-x'[i+1]*y'[i]) / (6*A) Cx' = sum (x'[i]+x'[i+1]) * (x'[i]*y'[i+1]-x'[i+1]*y'[i]) / (6*A)
Cy' = sum (y'[i]+y'[i+1]) * (x'[i]*y'[i+1]-x'[i+1]*y'[i]) / (6*A) Cy' = sum (y'[i]+y'[i+1]) * (x'[i]*y'[i+1]-x'[i+1]*y'[i]) / (6*A)
Note: The formula for the area of a polygon will return a negative Note: The formula for the area of a polygon will return a negative
value if the polygon is specified in clockwise direction. This value if the polygon is specified in a clockwise direction. This
can be used to determine the orientation of the polygon. can be used to determine the orientation of the polygon.
The third row contains a distance from a plane parallel to the The third row contains a distance from a plane parallel to the
polygon. If the polygon is coplanar, then the values for "z'" are polygon. If the polygon is coplanar, then the values for "z'" are
identical; however, the constraints recommended in [RFC5491] mean identical; however, the constraints recommended in [RFC5491] mean
that this is rarely the case. To determine "Cz'", average these that this is rarely the case. To determine "Cz'", average these
values: values:
Cz' = sum z'[i] / n Cz' = sum z'[i] / n
skipping to change at page 17, line 21 skipping to change at page 18, line 45
The reverse transformation can be applied directly as follows: The reverse transformation can be applied directly as follows:
Cx = -Ny * Cx' / p - Nx * Nz * Cy' / p + Nx * Cz' Cx = -Ny * Cx' / p - Nx * Nz * Cy' / p + Nx * Cz'
Cy = Nx * Cx' / p - Ny * Nz * Cy' / p + Ny * Cz' Cy = Nx * Cx' / p - Ny * Nz * Cy' / p + Ny * Cz'
Cz = p * Cy' + Nz * Cz' Cz = p * Cy' + Nz * Cz'
The ECEF value "[Cx,Cy,Cz]" can then be converted back to geodetic The ECEF value "[Cx,Cy,Cz]" can then be converted back to geodetic
coordinates. Given a polygon that is defined with no altitude or coordinates. Given a polygon that is defined with no altitude or
equal altitudes for each point, the altitude of the result can either equal altitudes for each point, the altitude of the result can be
be ignored or reset after converting back to a geodetic value. either ignored or reset after converting back to a geodetic value.
The centroid of the Prism shape is found by finding the centroid of The centroid of the Prism shape is found by finding the centroid of
the base polygon and raising the point by half the height of the the base polygon and raising the point by half the height of the
prism. This can be added to altitude of the final result; prism. This can be added to altitude of the final result;
alternatively, this can be added to "Cz'", which ensures that alternatively, this can be added to "Cz'", which ensures that
negative height is correctly applied to polygons that are defined in negative height is correctly applied to polygons that are defined in
a "clockwise" direction. a clockwise direction.
The recommended transforms only apply if "Nx" and "Ny" are non-zero. The recommended transforms only apply if "Nx" and "Ny" are non-zero.
If the normal vector is "[0,0,1]" (that is, along the z-axis), then If the normal vector is "[0,0,1]" (that is, along the z-axis), then
no transform is necessary. Similarly, if the normal vector is no transform is necessary. Similarly, if the normal vector is
"[0,1,0]" or "[1,0,0]", avoid the transformation and use the x and z "[0,1,0]" or "[1,0,0]", avoid the transformation and use the x and z
coordinates or y and z coordinates (respectively) in the centroid coordinates or y and z coordinates (respectively) in the centroid
calculation phase. If either "Nx" or "Ny" are zero, the alternative calculation phase. If either "Nx" or "Ny" are zero, the alternative
transform matrices in Figure 6 can be used. The reverse transform is transform matrices in Figure 6 can be used. The reverse transform is
the transpose of this matrix. the transpose of this matrix.
if Nx == 0: | if Ny == 0: if Nx == 0: | if Ny == 0:
[ 0 -Nz Ny ] [ 0 1 0 ] | [ -Nz 0 Nx ] [ 0 -Nz Ny ] [ 0 1 0 ] | [ -Nz 0 Nx ]
T = [ 1 0 0 ] T' = [ -Nz 0 Ny ] | T = T' = [ 0 1 0 ] T = [ 1 0 0 ] T' = [ -Nz 0 Ny ] | T = T' = [ 0 1 0 ]
[ 0 Ny Nz ] [ Ny 0 Nz ] | [ Nx 0 Nz ] [ 0 Ny Nz ] [ Ny 0 Nz ] | [ Nx 0 Nz ]
Figure 6: Alternative Transformation Matrices Figure 6: Alternative Transformation Matrices
5.2. Conversion to Circle or Sphere 5.2. Conversion to Circle or Sphere
The Circle or Sphere are simple shapes that suit a range of The circle or sphere are simple shapes that suit a range of
applications. A circle or sphere contains fewer units of data to applications. A circle or sphere contains fewer units of data to
manipulate, which simplifies operations on location estimates. manipulate, which simplifies operations on location estimates.
The simplest method for converting a location estimate to a Circle or The simplest method for converting a location estimate to a Circle or
Sphere shape is to determine the centroid and then find the longest Sphere shape is to determine the centroid and then find the longest
distance to any point in the region of uncertainty to that point. distance to any point in the region of uncertainty to that point.
This distance can be determined based on the shape type: This distance can be determined based on the shape type:
Circle/Sphere: No conversion necessary. Circle/Sphere: No conversion necessary.
Ellipse/Ellipsoid: The greater of either semi-major axis or altitude Ellipse/Ellipsoid: The greater of either semi-major axis or altitude
uncertainty. uncertainty.
Polygon/Prism: The distance to the furthest vertex of the polygon Polygon/Prism: The distance to the farthest vertex of the Polygon
(for a Prism, it is only necessary to check points on the base). (for a Prism, it is only necessary to check points on the base).
Arc-Band: The furthest length from the centroid to the points where Arc-Band: The farthest length from the centroid to the points where
the inner and outer arc end. This distance can be calculated by the inner and outer arc end. This distance can be calculated by
finding the larger of the two following formulae: finding the larger of the two following formulae:
X = sqrt( d*d + R*R - 2*d*R*cos(o/2) ) X = sqrt( d*d + R*R - 2*d*R*cos(o/2) )
x = sqrt( d*d + r*r - 2*d*r*cos(o/2) ) x = sqrt( d*d + r*r - 2*d*r*cos(o/2) )
Once the Circle or Sphere shape is found, the associated confidence Once the Circle or Sphere shape is found, the associated confidence
can be increased if the result is known to follow a normal can be increased if the result is known to follow a normal
distribution. However, this is a complicated process and provides distribution. However, this is a complicated process and provides
limited benefit. In many cases it also violates the constraint that limited benefit. In many cases, it also violates the constraint that
confidence in each dimension be the same. Confidence should be confidence in each dimension be the same. Confidence should be
unchanged when performing this conversion. unchanged when performing this conversion.
Two dimensional shapes are converted to a Circle; three dimensional Two-dimensional shapes are converted to a Circle; three-dimensional
shapes are converted to a Sphere. shapes are converted to a Sphere.
5.3. Three-Dimensional to Two-Dimensional Conversion 5.3. Conversion from Three-Dimensional to Two-Dimensional
A three-dimensional shape can be easily converted to a two- A three-dimensional shape can be easily converted to a two-
dimensional shape by removing the altitude component. A sphere dimensional shape by removing the altitude component. A Sphere
becomes a circle; a prism becomes a polygon; an ellipsoid becomes an becomes a Circle; a Prism becomes a Polygon; an Ellipsoid becomes an
ellipse. Each conversion is simple, requiring only the removal of Ellipse. Each conversion is simple, requiring only the removal of
those elements relating to altitude. those elements relating to altitude.
The altitude is unspecified for a two-dimensional shape and therefore The altitude is unspecified for a two-dimensional shape and therefore
has unlimited uncertainty along the vertical axis. The confidence has unlimited uncertainty along the vertical axis. The confidence
for the two-dimensional shape is thus higher than the three- for the two-dimensional shape is thus higher than the three-
dimensional shape. Assuming equal confidence on each axis, the dimensional shape. Assuming equal confidence on each axis, the
confidence of the circle can be increased using the following confidence of the Circle can be increased using the following
approximate formula: approximate formula:
C[2d] >= C[3d] ^ (2/3) C[2d] >= C[3d] ^ (2/3)
"C[2d]" is the confidence of the two-dimensional shape and "C[3d]" is "C[2d]" is the confidence of the two-dimensional shape and "C[3d]" is
the confidence of the three-dimensional shape. For example, a Sphere the confidence of the three-dimensional shape. For example, a Sphere
with a confidence of 95% can be simplified to a Circle of equal with a confidence of 95% can be simplified to a Circle of equal
radius with confidence of 96.6%. radius with confidence of 96.6%.
5.4. Increasing and Decreasing Uncertainty and Confidence 5.4. Increasing and Decreasing Uncertainty and Confidence
The combination of uncertainty and confidence provide a great deal of The combination of uncertainty and confidence provide a great deal of
information about the nature of the data that is being measured. If information about the nature of the data that is being measured. If
uncertainty, confidence and PDF are known, certain information can be uncertainty, confidence, and PDF are known, certain information can
extrapolated. In particular, the uncertainty can be scaled to meet a be extrapolated. In particular, the uncertainty can be scaled to
desired confidence or the confidence for a particular region of meet a desired confidence or the confidence for a particular region
uncertainty can be found. of uncertainty can be found.
In general, confidence decreases as the region of uncertainty In general, confidence decreases as the region of uncertainty
decreases in size and confidence increases as the region of decreases in size, and confidence increases as the region of
uncertainty increases in size. However, this depends on the PDF; uncertainty increases in size. However, this depends on the PDF;
expanding the region of uncertainty for a rectangular distribution expanding the region of uncertainty for a rectangular distribution
has no effect on confidence without additional information. If the has no effect on confidence without additional information. If the
region of uncertainty is increased during the process of obfuscation region of uncertainty is increased during the process of obfuscation
(see [RFC6772]), then the confidence cannot be increased. (see [RFC6772]), then the confidence cannot be increased.
A region of uncertainty that is reduced in size always has a lower A region of uncertainty that is reduced in size always has a lower
confidence. confidence.
A region of uncertainty that has an unknown PDF shape cannot be A region of uncertainty that has an unknown PDF shape cannot be
skipping to change at page 20, line 46 skipping to change at page 22, line 36
uncertainty. uncertainty.
Therefore, to find the uncertainty for each axis at a desired Therefore, to find the uncertainty for each axis at a desired
confidence, "Cd", apply the following formula: confidence, "Cd", apply the following formula:
Ud[x] <= U[x] * (erfinv(Cd ^ (1/n)) / erfinv(Co ^ (1/n))) Ud[x] <= U[x] * (erfinv(Cd ^ (1/n)) / erfinv(Co ^ (1/n)))
For regular shapes, this formula can be applied as a scaling factor For regular shapes, this formula can be applied as a scaling factor
in each dimension to reach a required confidence. in each dimension to reach a required confidence.
5.5. Determining Whether a Location is Within a Given Region 5.5. Determining Whether a Location Is within a Given Region
A number of applications require that a judgment be made about A number of applications require that a judgment be made about
whether a Target is within a given region of interest. Given a whether a Target is within a given region of interest. Given a
location estimate with uncertainty, this judgment can be difficult. location estimate with uncertainty, this judgment can be difficult.
A location estimate represents a probability distribution, and the A location estimate represents a probability distribution, and the
true location of the Target cannot be definitively known. Therefore, true location of the Target cannot be definitively known. Therefore,
the judgment relies on determining the probability that the Target is the judgment relies on determining the probability that the Target is
within the region. within the region.
The probability that the Target is within a particular region is The probability that the Target is within a particular region is
found by integrating the PDF over the region. For a normal found by integrating the PDF over the region. For a normal
distribution, there are no analytical methods that can be used to distribution, there are no analytical methods that can be used to
determine the integral of the two or three dimensional PDF over an determine the integral of the two- or three-dimensional PDF over an
arbitrary region. The complexity of numerical methods is also too arbitrary region. The complexity of numerical methods is also too
great to be useful in many applications; for example, finding the great to be useful in many applications; for example, finding the
integral of the PDF in two or three dimensions across the overlap integral of the PDF in two or three dimensions across the overlap
between the uncertainty region and the target region. If the PDF is between the uncertainty region and the target region. If the PDF is
unknown, no determination can be made without a simplifying unknown, no determination can be made without a simplifying
assumption. assumption.
When judging whether a location is within a given region, this When judging whether a location is within a given region, this
document assumes that uncertainties are rectangular. This introduces document assumes that uncertainties are rectangular. This introduces
errors, but simplifies the calculations significantly. Prior to errors, but simplifies the calculations significantly. Prior to
skipping to change at page 21, line 51 skipping to change at page 23, line 41
/ \ :::::::::: \ / / \ :::::::::: \ /
/ `._ :::::: _.X / `._ :::::: _.X
| `-....-' | | `-....-' |
| | | |
| | | |
\ / \ /
`. .' \_ Region of `. .' \_ Region of
`._ _.' Interest `._ _.' Interest
`--..___..--' `--..___..--'
Figure 7: Area of Overlap Between Two Circular Regions Figure 7: Area of Overlap between Two Circular Regions
Once the area of overlap, "Ao", is known, the probability that the Once the area of overlap, "Ao", is known, the probability that the
Target is within the region of interest, "Pi", is: Target is within the region of interest, "Pi", is:
Pi = Co * Ao / Au Pi = Co * Ao / Au
Given that the area of the region of uncertainty is "Au" and the Given that the area of the region of uncertainty is "Au" and the
confidence is "Co". confidence is "Co".
This probability is often input to a decision process that has a This probability is often input to a decision process that has a
skipping to change at page 22, line 29 skipping to change at page 24, line 29
as is required by [RFC5222], then the region with the highest as is required by [RFC5222], then the region with the highest
probability can be selected. probability can be selected.
5.5.1. Determining the Area of Overlap for Two Circles 5.5.1. Determining the Area of Overlap for Two Circles
Determining the area of overlap between two arbitrary shapes is a Determining the area of overlap between two arbitrary shapes is a
non-trivial process. Reducing areas to circles (see Section 5.2) non-trivial process. Reducing areas to circles (see Section 5.2)
enables the application of the following process. enables the application of the following process.
Given the radius of the first circle "r", the radius of the second Given the radius of the first circle "r", the radius of the second
circle "R" and the distance between their center points "d", the circle "R", and the distance between their center points "d", the
following set of formulas provide the area of overlap "Ao". following set of formulae provide the area of overlap "Ao".
o If the circles don't overlap, that is "d >= r+R", "Ao" is zero. o If the circles don't overlap, that is "d >= r+R", "Ao" is zero.
o If one of the two circles is entirely within the other, that is o If one of the two circles is entirely within the other, that is
"d <= |r-R|", the area of overlap is the area of the smaller "d <= |r-R|", the area of overlap is the area of the smaller
circle. circle.
o Otherwise, if the circles partially overlap, that is "d < r+R" and o Otherwise, if the circles partially overlap, that is "d < r+R" and
"d > |r-R|", find "Ao" using: "d > |r-R|", find "Ao" using:
skipping to change at page 23, line 28 skipping to change at page 25, line 28
contained within the smaller polygon. Where the entire area of the contained within the smaller polygon. Where the entire area of the
larger polygon is of interest, geodesic interpolation is necessary. larger polygon is of interest, geodesic interpolation is necessary.
6. Examples 6. Examples
This section presents some examples of how to apply the methods This section presents some examples of how to apply the methods
described in Section 5. described in Section 5.
6.1. Reduction to a Point or Circle 6.1. Reduction to a Point or Circle
Alice receives a location estimate from her LIS that contains an Alice receives a location estimate from her Location Information
ellipsoidal region of uncertainty. This information is provided at Server (LIS) that contains an ellipsoidal region of uncertainty.
19% confidence with a normal PDF. A PIDF-LO extract for this This information is provided at 19% confidence with a normal PDF. A
information is shown in Figure 8. PIDF-LO extract for this information is shown in Figure 8.
<gp:geopriv> <gp:geopriv>
<gp:location-info> <gp:location-info>
<gs:Ellipsoid srsName="urn:ogc:def:crs:EPSG::4979"> <gs:Ellipsoid srsName="urn:ogc:def:crs:EPSG::4979">
<gml:pos>-34.407242 150.882518 34</gml:pos> <gml:pos>-34.407242 150.882518 34</gml:pos>
<gs:semiMajorAxis uom="urn:ogc:def:uom:EPSG::9001"> <gs:semiMajorAxis uom="urn:ogc:def:uom:EPSG::9001">
7.7156 7.7156
</gs:semiMajorAxis> </gs:semiMajorAxis>
<gs:semiMinorAxis uom="urn:ogc:def:uom:EPSG::9001"> <gs:semiMinorAxis uom="urn:ogc:def:uom:EPSG::9001">
3.31 3.31
skipping to change at page 24, line 27 skipping to change at page 26, line 27
</gs:verticalAxis> </gs:verticalAxis>
<gs:orientation uom="urn:ogc:def:uom:EPSG::9102"> <gs:orientation uom="urn:ogc:def:uom:EPSG::9102">
43 43
</gs:orientation> </gs:orientation>
</gs:Ellipsoid> </gs:Ellipsoid>
<con:confidence pdf="normal">95</con:confidence> <con:confidence pdf="normal">95</con:confidence>
</gp:location-info> </gp:location-info>
<gp:usage-rules/> <gp:usage-rules/>
</gp:geopriv> </gp:geopriv>
Figure 8 Figure 8: Alice's Ellipsoid Location
This information can be reduced to a point simply by extracting the This information can be reduced to a point simply by extracting the
center point, that is [-34.407242, 150.882518, 34]. center point, that is [-34.407242, 150.882518, 34].
If some limited uncertainty were required, the estimate could be If some limited uncertainty were required, the estimate could be
converted into a circle or sphere. To convert to a sphere, the converted into a circle or sphere. To convert to a sphere, the
radius is the largest of the semi-major, semi-minor and vertical radius is the largest of the semi-major, semi-minor and vertical
axes; in this case, 28.7 meters. axes; in this case, 28.7 meters.
However, if only a circle is required, the altitude can be dropped as However, if only a circle is required, the altitude can be dropped as
skipping to change at page 25, line 18 skipping to change at page 27, line 18
<gml:posList> <gml:posList>
-33.856625 151.215906 -33.856299 151.215343 -33.856625 151.215906 -33.856299 151.215343
-33.856326 151.214731 -33.857533 151.214495 -33.856326 151.214731 -33.857533 151.214495
-33.857720 151.214613 -33.857369 151.215375 -33.857720 151.214613 -33.857369 151.215375
-33.856625 151.215906 -33.856625 151.215906
</gml:posList> </gml:posList>
</gml:LinearRing> </gml:LinearRing>
</gml:exterior> </gml:exterior>
</gml:Polygon> </gml:Polygon>
Figure 9 Figure 9: Bob's Polygon Location
To convert this to a polygon, each point is firstly assigned an To convert this to a polygon, each point is firstly assigned an
altitude of zero and converted to ECEF coordinates (see Appendix A). altitude of zero and converted to ECEF coordinates (see Appendix A).
Then a normal vector for this polygon is found (see Appendix B). The Then, a normal vector for this polygon is found (see Appendix B).
result of each of these stages is shown in Figure 10. Note that the The result of each of these stages is shown in Figure 10. Note that
numbers shown in this document are rounded only for formatting the numbers shown in this document are rounded only for formatting
reasons; the actual calculations do not include rounding, which would reasons; the actual calculations do not include rounding, which would
generate significant errors in the final values. generate significant errors in the final values.
Polygon in ECEF coordinate space Polygon in ECEF coordinate space
(repeated point omitted and transposed to fit): (repeated point omitted and transposed to fit):
[ -4.6470e+06 2.5530e+06 -3.5333e+06 ] [ -4.6470e+06 2.5530e+06 -3.5333e+06 ]
[ -4.6470e+06 2.5531e+06 -3.5332e+06 ] [ -4.6470e+06 2.5531e+06 -3.5332e+06 ]
pecef = [ -4.6470e+06 2.5531e+06 -3.5332e+06 ] pecef = [ -4.6470e+06 2.5531e+06 -3.5332e+06 ]
[ -4.6469e+06 2.5531e+06 -3.5333e+06 ] [ -4.6469e+06 2.5531e+06 -3.5333e+06 ]
[ -4.6469e+06 2.5531e+06 -3.5334e+06 ] [ -4.6469e+06 2.5531e+06 -3.5334e+06 ]
skipping to change at page 26, line 42 skipping to change at page 28, line 42
Average of pecef' z coordinates: 6.3715e+06 Average of pecef' z coordinates: 6.3715e+06
Reverse Transformation Matrix: Reverse Transformation Matrix:
[ -0.48152 -0.48828 -0.72782 ] [ -0.48152 -0.48828 -0.72782 ]
t' = [ -0.87643 0.26827 0.39987 ] t' = [ -0.87643 0.26827 0.39987 ]
[ 0.00000 0.83043 -0.55712 ] [ 0.00000 0.83043 -0.55712 ]
Polygon centroid (ECEF): C = [ -4.6470e+06 2.5531e+06 -3.5333e+06 ] Polygon centroid (ECEF): C = [ -4.6470e+06 2.5531e+06 -3.5333e+06 ]
Polygon centroid (Geo): Cg = [ -33.856926 151.215102 -4.9537e-04 ] Polygon centroid (Geo): Cg = [ -33.856926 151.215102 -4.9537e-04 ]
Figure 10 Figure 10: Calculation of Polygon Centroid
The point conversion for the polygon uses the final result, "Cg", The point conversion for the polygon uses the final result, "Cg",
ignoring the altitude since the original shape did not include ignoring the altitude since the original shape did not include
altitude. altitude.
To convert this to a circle, take the maximum distance in ECEF To convert this to a circle, take the maximum distance in ECEF
coordinates from the center point to each of the points. This coordinates from the center point to each of the points. This
results in a radius of 99.1 meters. Confidence is unchanged. results in a radius of 99.1 meters. Confidence is unchanged.
6.2. Increasing and Decreasing Confidence 6.2. Increasing and Decreasing Confidence
skipping to change at page 27, line 40 skipping to change at page 29, line 40
new region of uncertainty, find its area using the same translation new region of uncertainty, find its area using the same translation
method described in Section 5.1.1.2, which produces 4566.2 square method described in Section 5.1.1.2, which produces 4566.2 square
meters. Given that the Concert Hall is entirely within Bob's meters. Given that the Concert Hall is entirely within Bob's
original location estimate, the confidence associated with the original location estimate, the confidence associated with the
smaller area is therefore 95% * 4566.2 / 12600 = 34%. smaller area is therefore 95% * 4566.2 / 12600 = 34%.
6.3. Matching Location Estimates to Regions of Interest 6.3. Matching Location Estimates to Regions of Interest
Suppose that a circular area is defined centered at Suppose that a circular area is defined centered at
[-33.872754, 151.20683] with a radius of 1950 meters. To determine [-33.872754, 151.20683] with a radius of 1950 meters. To determine
whether Bob is found within this area - given that Bob is at whether Bob is found within this area -- given that Bob is at
[-34.407242, 150.882518] with an uncertainty radius 7.7156 meters - [-34.407242, 150.882518] with an uncertainty radius 7.7156 meters --
we apply the method in Section 5.5. Using the converted Circle shape we apply the method in Section 5.5. Using the converted Circle shape
for Bob's location, the distance between these points is found to be for Bob's location, the distance between these points is found to be
1915.26 meters. The area of overlap between Bob's location estimate 1915.26 meters. The area of overlap between Bob's location estimate
and the region of interest is therefore 2209 square meters and the and the region of interest is therefore 2209 square meters and the
area of Bob's location estimate is 30853 square meters. This gives area of Bob's location estimate is 30853 square meters. This gives
the estimated probability that Bob is less than 1950 meters from the the estimated probability that Bob is less than 1950 meters from the
selected point as 67.8%. selected point as 67.8%.
Note that if 1920 meters were chosen for the distance from the Note that if 1920 meters were chosen for the distance from the
selected point, the area of overlap is only 16196 square meters and selected point, the area of overlap is only 16196 square meters and
the confidence is 49.8%. Therefore, it is marginally more likely the confidence is 49.8%. Therefore, it is marginally more likely
that Bob is outside the region of interest, despite the center point that Bob is outside the region of interest, despite the center point
of his location estimate being within the region. of his location estimate being within the region.
6.4. PIDF-LO With Confidence Example 6.4. PIDF-LO with Confidence Example
The PIDF-LO document in Figure 11 includes a representation of The PIDF-LO document in Figure 11 includes a representation of
uncertainty as a circular area. The confidence element (on the line uncertainty as a circular area. The confidence element (on the line
marked with a comment) indicates that the confidence is 67% and that marked with a comment) indicates that the confidence is 67% and that
it follows a normal distribution. it follows a normal distribution.
<pidf:presence <pidf:presence
xmlns:pidf="urn:ietf:params:xml:ns:pidf" xmlns:pidf="urn:ietf:params:xml:ns:pidf"
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10" xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10"
xmlns:gs="http://www.opengis.net/pidflo/1.0" xmlns:gs="http://www.opengis.net/pidflo/1.0"
xmlns:gml="http://www.opengis.net/gml" xmlns:gml="http://www.opengis.net/gml"
xmlns:con="urn:ietf:params:xml:ns:geopriv:conf" xmlns:con="urn:ietf:params:xml:ns:geopriv:conf"
entity="pres:alice@example.com"> entity="pres:alice@example.com">
<dm:device id="sg89ab"> <dm:device id="sg89ab">
<pidf:status> <gp:geopriv>
<gp:geopriv> <gp:location-info>
<gp:location-info> <gs:Circle srsName="urn:ogc:def:crs:EPSG::4326">
<gs:Circle srsName="urn:ogc:def:crs:EPSG::4326"> <gml:pos>42.5463 -73.2512</gml:pos>
<gml:pos>42.5463 -73.2512</gml:pos> <gs:radius uom="urn:ogc:def:uom:EPSG::9001">
<gs:radius uom="urn:ogc:def:uom:EPSG::9001"> 850.24
850.24 </gs:radius>
</gs:radius> </gs:Circle>
</gs:Circle> <!--c--> <con:confidence pdf="normal">67</con:confidence>
<!-- c --> <con:confidence pdf="normal">67</con:confidence> </gp:location-info>
</gp:location-info> <gp:usage-rules/>
<gp:usage-rules/> </gp:geopriv>
</gp:geopriv> <dm:deviceID>mac:010203040506</dm:deviceID>
</pidf:status> </dm:device>
<dm:deviceID>mac:010203040506</dm:deviceID> </pidf:presence>
</dm:device>
</pidf:presence>
Figure 11: Example PIDF-LO with Confidence Figure 11: Example PIDF-LO with Confidence
7. Confidence Schema 7. Confidence Schema
<?xml version="1.0"?> <?xml version="1.0"?>
<xs:schema <xs:schema
xmlns:conf="urn:ietf:params:xml:ns:geopriv:conf" xmlns:conf="urn:ietf:params:xml:ns:geopriv:conf"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:ietf:params:xml:ns:geopriv:conf" targetNamespace="urn:ietf:params:xml:ns:geopriv:conf"
elementFormDefault="qualified" elementFormDefault="qualified"
attributeFormDefault="unqualified"> attributeFormDefault="unqualified">
<xs:annotation> <xs:annotation>
<xs:appinfo <xs:appinfo
source="urn:ietf:params:xml:schema:geopriv:conf"> source="urn:ietf:params:xml:schema:geopriv:conf">
PIDF-LO Confidence PIDF-LO Confidence
</xs:appinfo> </xs:appinfo>
<xs:documentation source="http://www.ietf.org/rfc/rfcXXXX.txt"> <xs:documentation
<!-- [[NOTE TO RFC-EDITOR: Please replace above URL with URL of source="http://www.rfc-editor.org/rfc/rfc7459.txt">
published RFC and remove this note.]] -->
This schema defines an element that is used for indicating This schema defines an element that is used for indicating
confidence in PIDF-LO documents. confidence in PIDF-LO documents.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
<xs:element name="confidence" type="conf:confidenceType"/> <xs:element name="confidence" type="conf:confidenceType"/>
<xs:complexType name="confidenceType"> <xs:complexType name="confidenceType">
<xs:simpleContent> <xs:simpleContent>
<xs:extension base="conf:confidenceBase"> <xs:extension base="conf:confidenceBase">
skipping to change at page 30, line 12 skipping to change at page 32, line 19
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:schema> </xs:schema>
8. IANA Considerations 8. IANA Considerations
8.1. URN Sub-Namespace Registration for 8.1. URN Sub-Namespace Registration for
urn:ietf:params:xml:ns:geopriv:conf urn:ietf:params:xml:ns:geopriv:conf
This section registers a new XML namespace, A new XML namespace, "urn:ietf:params:xml:ns:geopriv:conf", has been
"urn:ietf:params:xml:ns:geopriv:conf", as per the guidelines in registered, as per the guidelines in [RFC3688].
[RFC3688].
URI: urn:ietf:params:xml:ns:geopriv:conf URI: urn:ietf:params:xml:ns:geopriv:conf
Registrant Contact: IETF, GEOPRIV working group, (geopriv@ietf.org), Registrant Contact: IETF GEOPRIV working group (geopriv@ietf.org),
Martin Thomson (martin.thomson@gmail.com). Martin Thomson (martin.thomson@gmail.com).
XML: XML:
BEGIN BEGIN
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head> <head>
<title>PIDF-LO Confidence Attribute</title> <title>PIDF-LO Confidence Attribute</title>
</head> </head>
<body> <body>
<h1>Namespace for PIDF-LO Confidence Attribute</h1> <h1>Namespace for PIDF-LO Confidence Attribute</h1>
<h2>urn:ietf:params:xml:ns:geopriv:conf</h2> <h2>urn:ietf:params:xml:ns:geopriv:conf</h2>
[[NOTE TO IANA/RFC-EDITOR: Please update RFC URL and replace XXXX <p>See <a href="http://www.rfc-editor.org/rfc/rfc7459.txt">
with the RFC number for this specification.]] RFC 7459</a>.</p>
<p>See <a href="[[RFC URL]]">RFCXXXX</a>.</p> </body>
</body> </html>
</html> END
END
8.2. XML Schema Registration 8.2. XML Schema Registration
This section registers an XML schema as per the guidelines in An XML schema has been registered, as per the guidelines in
[RFC3688]. [RFC3688].
URI: urn:ietf:params:xml:schema:geopriv:conf URI: urn:ietf:params:xml:schema:geopriv:conf
Registrant Contact: IETF, GEOPRIV working group, (geopriv@ietf.org), Registrant Contact: IETF GEOPRIV working group (geopriv@ietf.org),
Martin Thomson (martin.thomson@gmail.com). Martin Thomson (martin.thomson@gmail.com).
Schema: The XML for this schema can be found as the entirety of Schema: The XML for this schema can be found as the entirety of
Section 7 of this document. Section 7 of this document.
9. Security Considerations 9. Security Considerations
This document describes methods for managing and manipulating This document describes methods for managing and manipulating
uncertainty in location. No specific security concerns arise from uncertainty in location. No specific security concerns arise from
most of the information provided. The considerations of [RFC4119] most of the information provided. The considerations of [RFC4119]
skipping to change at page 31, line 35 skipping to change at page 33, line 48
this information. Note however that information might not be this information. Note however that information might not be
perfectly protected due to difficulties associated with location perfectly protected due to difficulties associated with location
obfuscation, as described in Section 13.5 of [RFC6772]. In obfuscation, as described in Section 13.5 of [RFC6772]. In
particular, increasing uncertainty does not necessarily result in a particular, increasing uncertainty does not necessarily result in a
reduction of the information conveyed by the location object. reduction of the information conveyed by the location object.
Adding confidence to location information risks misinterpretation by Adding confidence to location information risks misinterpretation by
consumers of location that do not understand the element. This could consumers of location that do not understand the element. This could
be exploited, particularly when reducing confidence, since the be exploited, particularly when reducing confidence, since the
resulting uncertainty region might include locations that are less resulting uncertainty region might include locations that are less
likely to contain the target than the recipient expects. Since this likely to contain the Target than the recipient expects. Since this
sort of error is always a possibility, the impact of this is low. sort of error is always a possibility, the impact of this is low.
10. Acknowledgements 10. References
Peter Rhodes provided assistance with some of the mathematical
groundwork on this document. Dan Cornford provided a detailed review
and many terminology corrections.
11. References
11.1. Normative References 10.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
January 2004. January 2004, <http://www.rfc-editor.org/info/rfc3688>.
[RFC3693] Cuellar, J., Morris, J., Mulligan, D., Peterson, J., and [RFC3693] Cuellar, J., Morris, J., Mulligan, D., Peterson, J., and
J. Polk, "Geopriv Requirements", RFC 3693, February 2004. J. Polk, "Geopriv Requirements", RFC 3693, February 2004,
<http://www.rfc-editor.org/info/rfc3693>.
[RFC4119] Peterson, J., "A Presence-based GEOPRIV Location Object [RFC4119] Peterson, J., "A Presence-based GEOPRIV Location Object
Format", RFC 4119, December 2005. Format", RFC 4119, December 2005,
<http://www.rfc-editor.org/info/rfc4119>.
[RFC5139] Thomson, M. and J. Winterbottom, "Revised Civic Location [RFC5139] Thomson, M. and J. Winterbottom, "Revised Civic Location
Format for Presence Information Data Format Location Format for Presence Information Data Format Location
Object (PIDF-LO)", RFC 5139, February 2008. Object (PIDF-LO)", RFC 5139, February 2008,
<http://www.rfc-editor.org/info/rfc5139>.
[RFC5491] Winterbottom, J., Thomson, M., and H. Tschofenig, "GEOPRIV [RFC5491] Winterbottom, J., Thomson, M., and H. Tschofenig, "GEOPRIV
Presence Information Data Format Location Object (PIDF-LO) Presence Information Data Format Location Object (PIDF-LO)
Usage Clarification, Considerations, and Recommendations", Usage Clarification, Considerations, and Recommendations",
RFC 5491, March 2009. RFC 5491, March 2009,
<http://www.rfc-editor.org/info/rfc5491>.
[RFC6225] Polk, J., Linsner, M., Thomson, M., and B. Aboba, "Dynamic [RFC6225] Polk, J., Linsner, M., Thomson, M., and B. Aboba, Ed.,
Host Configuration Protocol Options for Coordinate-Based "Dynamic Host Configuration Protocol Options for
Location Configuration Information", RFC 6225, July 2011. Coordinate-Based Location Configuration Information", RFC
6225, July 2011, <http://www.rfc-editor.org/info/rfc6225>.
[RFC6280] Barnes, R., Lepinski, M., Cooper, A., Morris, J., [RFC6280] Barnes, R., Lepinski, M., Cooper, A., Morris, J.,
Tschofenig, H., and H. Schulzrinne, "An Architecture for Tschofenig, H., and H. Schulzrinne, "An Architecture for
Location and Location Privacy in Internet Applications", Location and Location Privacy in Internet Applications",
BCP 160, RFC 6280, July 2011. BCP 160, RFC 6280, July 2011,
<http://www.rfc-editor.org/info/rfc6280>.
11.2. Informative References 10.2. Informative References
[Convert] Burtch, R., "A Comparison of Methods Used in Rectangular [Convert] Burtch, R., "A Comparison of Methods Used in Rectangular
to Geodetic Coordinate Transformations", April 2006. to Geodetic Coordinate Transformations", April 2006.
[GeoShape] [GeoShape] Thomson, M. and C. Reed, "GML 3.1.1 PIDF-LO Shape
Thomson, M. and C. Reed, "GML 3.1.1 PIDF-LO Shape
Application Schema for use by the Internet Engineering Application Schema for use by the Internet Engineering
Task Force (IETF)", Candidate OpenGIS Implementation Task Force (IETF)", Candidate OpenGIS Implementation
Specification 06-142r1, Version: 1.0, April 2007. Specification 06-142r1, Version: 1.0, April 2007.
[ISO.GUM] ISO/IEC, "Guide to the expression of uncertainty in [ISO.GUM] ISO/IEC, "Guide to the expression of uncertainty in
measurement (GUM)", Guide 98:1995, 1995. measurement (GUM)", Guide 98:1995, 1995.
[NIST.TN1297] [NIST.TN1297]
Taylor, B. and C. Kuyatt, "Guidelines for Evaluating and Taylor, B. and C. Kuyatt, "Guidelines for Evaluating and
Expressing the Uncertainty of NIST Measurement Results", Expressing the Uncertainty of NIST Measurement Results",
Technical Note 1297, Sep 1994. Technical Note 1297, September 1994.
[RFC5222] Hardie, T., Newton, A., Schulzrinne, H., and H. [RFC5222] Hardie, T., Newton, A., Schulzrinne, H., and H.
Tschofenig, "LoST: A Location-to-Service Translation Tschofenig, "LoST: A Location-to-Service Translation
Protocol", RFC 5222, August 2008. Protocol", RFC 5222, August 2008,
<http://www.rfc-editor.org/info/rfc5222>.
[RFC6772] Schulzrinne, H., Tschofenig, H., Cuellar, J., Polk, J., [RFC6772] Schulzrinne, H., Ed., Tschofenig, H., Ed., Cuellar, J.,
Morris, J., and M. Thomson, "Geolocation Policy: A Polk, J., Morris, J., and M. Thomson, "Geolocation Policy:
Document Format for Expressing Privacy Preferences for A Document Format for Expressing Privacy Preferences for
Location Information", RFC 6772, January 2013. Location Information", RFC 6772, January 2013,
<http://www.rfc-editor.org/info/rfc6772>.
[Sunday02] [Sunday02] Sunday, D., "Fast polygon area and Newell normal
Sunday, D., "Fast polygon area and Newell normal computation", Journal of Graphics Tools JGT, 7(2):9-13,
computation", Journal of Graphics Tools JGT, 2002.
7(2):9-13,2002, 2002,
<http://www.acm.org/jgt/papers/Sunday02/>.
[TS-3GPP-23_032] [TS-3GPP-23_032]
3GPP, "Universal Geographic Area Description (GAD)", 3GPP 3GPP, "Universal Geographical Area Description (GAD)",
TS 23.032 11.0.0, September 2012. 3GPP TS 23.032 12.0.0, September 2014.
[Vatti92] Vatti, B., "A generic solution to polygon clipping", [Vatti92] Vatti, B., "A generic solution to polygon clipping",
Communications of the ACM Vol35, Issue7, pp56-63, 1992, Communications of the ACM Volume 35, Issue 7, pages 56-63,
<http://portal.acm.org/citation.cfm?id=129906 >. July 1992,
<http://portal.acm.org/citation.cfm?id=129906>.
[WGS84] US National Imagery and Mapping Agency, "Department of [WGS84] US National Imagery and Mapping Agency, "Department of
Defense (DoD) World Geodetic System 1984 (WGS 84), Third Defense (DoD) World Geodetic System 1984 (WGS 84), Third
Edition", NIMA TR8350.2, January 2000. Edition", NIMA TR8350.2, January 2000.
Appendix A. Conversion Between Cartesian and Geodetic Coordinates in Appendix A. Conversion between Cartesian and Geodetic Coordinates in
WGS84 WGS84
The process of conversion from geodetic (latitude, longitude and The process of conversion from geodetic (latitude, longitude, and
altitude) to earth-centered, earth-fixed (ECEF) Cartesian coordinates altitude) to ECEF Cartesian coordinates is relatively simple.
is relatively simple.
In this section, the following constants and derived values are used In this appendix, the following constants and derived values are used
from the definition of WGS84 [WGS84]: from the definition of WGS84 [WGS84]:
{radius of ellipsoid} R = 6378137 meters {radius of ellipsoid} R = 6378137 meters
{inverse flattening} 1/f = 298.257223563 {inverse flattening} 1/f = 298.257223563
{first eccentricity squared} e^2 = f * (2 - f) {first eccentricity squared} e^2 = f * (2 - f)
{second eccentricity squared} e'^2 = e^2 * (1 - e^2) {second eccentricity squared} e'^2 = e^2 * (1 - e^2)
skipping to change at page 34, line 4 skipping to change at page 36, line 28
{first eccentricity squared} e^2 = f * (2 - f) {first eccentricity squared} e^2 = f * (2 - f)
{second eccentricity squared} e'^2 = e^2 * (1 - e^2) {second eccentricity squared} e'^2 = e^2 * (1 - e^2)
To convert geodetic coordinates (latitude, longitude, altitude) to To convert geodetic coordinates (latitude, longitude, altitude) to
ECEF coordinates (X, Y, Z), use the following relationships: ECEF coordinates (X, Y, Z), use the following relationships:
N = R / sqrt(1 - e^2 * sin(latitude)^2) N = R / sqrt(1 - e^2 * sin(latitude)^2)
X = (N + altitude) * cos(latitude) * cos(longitude) X = (N + altitude) * cos(latitude) * cos(longitude)
Y = (N + altitude) * cos(latitude) * sin(longitude) Y = (N + altitude) * cos(latitude) * sin(longitude)
Z = (N*(1 - e^2) + altitude) * sin(latitude) Z = (N*(1 - e^2) + altitude) * sin(latitude)
The reverse conversion requires more complex computation and most The reverse conversion requires more complex computation, and most
methods introduce some error in latitude and altitude. A range of methods introduce some error in latitude and altitude. A range of
techniques are described in [Convert]. A variant on the method techniques are described in [Convert]. A variant on the method
originally proposed by Bowring, which results in an acceptably small originally proposed by Bowring, which results in an acceptably small
error, is described by the following: error, is described by the following:
p = sqrt(X^2 + Y^2) p = sqrt(X^2 + Y^2)
r = sqrt(X^2 + Y^2 + Z^2) r = sqrt(X^2 + Y^2 + Z^2)
u = atan((1-f) * Z * (1 + e'^2 * (1-f) * R / r) / p) u = atan((1-f) * Z * (1 + e'^2 * (1-f) * R / r) / p)
latitude = atan((Z + e'^2 * (1-f) * R * sin(u)^3) latitude = atan((Z + e'^2 * (1-f) * R * sin(u)^3)
/ (p - e^2 * R * cos(u)^3)) / (p - e^2 * R * cos(u)^3))
longitude = atan2(Y, X) longitude = atan2(Y, X)
altitude = sqrt((p - R * cos(u))^2 + (Z - (1-f) * R * sin(u))^2) altitude = sqrt((p - R * cos(u))^2 + (Z - (1-f) * R * sin(u))^2)
If the point is near the poles, that is "p < 1", the value for If the point is near the poles, that is, "p < 1", the value for
altitude that this method produces is unstable. A simpler method for altitude that this method produces is unstable. A simpler method for
determining the altitude of a point near the poles is: determining the altitude of a point near the poles is:
altitude = |Z| - R * (1 - f) altitude = |Z| - R * (1 - f)
Appendix B. Calculating the Upward Normal of a Polygon Appendix B. Calculating the Upward Normal of a Polygon
For a polygon that is guaranteed to be convex and coplanar, the For a polygon that is guaranteed to be convex and coplanar, the
upward normal can be found by finding the vector cross product of upward normal can be found by finding the vector cross product of
adjacent edges. adjacent edges.
For more general cases the Newell method of approximation described For more general cases, the Newell method of approximation described
in [Sunday02] may be applied. In particular, this method can be used in [Sunday02] may be applied. In particular, this method can be used
if the points are only approximately coplanar, and for non-convex if the points are only approximately coplanar, and for non-convex
polygons. polygons.
This process requires a Cartesian coordinate system. Therefore, This process requires a Cartesian coordinate system. Therefore,
convert the geodetic coordinates of the polygon to Cartesian, ECEF convert the geodetic coordinates of the polygon to Cartesian, ECEF
coordinates (Appendix A). If no altitude is specified, assume an coordinates (Appendix A). If no altitude is specified, assume an
altitude of zero. altitude of zero.
This method can be condensed to the following set of equations: This method can be condensed to the following set of equations:
skipping to change at page 35, line 21 skipping to change at page 38, line 5
To translate this into a unit-vector; divide each component by the To translate this into a unit-vector; divide each component by the
length of the vector: length of the vector:
Nx' = Nx / sqrt(Nx^2 + Ny^2 + Nz^2) Nx' = Nx / sqrt(Nx^2 + Ny^2 + Nz^2)
Ny' = Ny / sqrt(Nx^2 + Ny^2 + Nz^2) Ny' = Ny / sqrt(Nx^2 + Ny^2 + Nz^2)
Nz' = Nz / sqrt(Nx^2 + Ny^2 + Nz^2) Nz' = Nz / sqrt(Nx^2 + Ny^2 + Nz^2)
B.1. Checking that a Polygon Upward Normal Points Up B.1. Checking That a Polygon Upward Normal Points Up
RFC 5491 [RFC5491] stipulates that polygons be presented in anti- RFC 5491 [RFC5491] stipulates that the Polygon shape be presented in
clockwise direction so that the upward normal is in an upward counterclockwise direction so that the upward normal is in an upward
direction. Accidental reversal of points can invert this vector. direction. Accidental reversal of points can invert this vector.
This error can be hard to detect just by looking at the series of This error can be hard to detect just by looking at the series of
coordinates that form the polygon. coordinates that form the polygon.
Calculate the dot product of the upward normal of the polygon Calculate the dot product of the upward normal of the polygon
(Appendix B) and any vector that points away from the center of the (Appendix B) and any vector that points away from the center of the
Earth from the location of polygon. If this product is positive, earth from the location of polygon. If this product is positive,
then the polygon upward normal also points away from the center of then the polygon upward normal also points away from the center of
the Earth. the earth.
The inverse cosine of this value indicates the angle between the The inverse cosine of this value indicates the angle between the
horizontal plane and the approximate plane of the polygon. horizontal plane and the approximate plane of the polygon.
A unit vector for the upward direction at any point can be found A unit vector for the upward direction at any point can be found
based on the latitude (lat) and longitude (lng) of the point, as based on the latitude (lat) and longitude (lng) of the point, as
follows: follows:
Up = [ cos(lat) * cos(lng) ; cos(lat) * sin(lng) ; sin(lat) ] Up = [ cos(lat) * cos(lng) ; cos(lat) * sin(lng) ; sin(lat) ]
For polygons that span less than half the globe, any point in the For polygons that span less than half the globe, any point in the
polygon - including the centroid - can be selected to generate an polygon -- including the centroid -- can be selected to generate an
approximate up vector for comparison with the upward normal. approximate up vector for comparison with the upward normal.
Acknowledgements
Peter Rhodes provided assistance with some of the mathematical
groundwork on this document. Dan Cornford provided a detailed review
and many terminology corrections.
Authors' Addresses Authors' Addresses
Martin Thomson Martin Thomson
Mozilla Mozilla
331 E Evelyn Street 331 E Evelyn Street
Mountain View, CA 94041 Mountain View, CA 94041
US United States
Email: martin.thomson@gmail.com EMail: martin.thomson@gmail.com
James Winterbottom James Winterbottom
Unaffiliated Unaffiliated
AU Australia
Email: a.james.winterbottom@gmail.com EMail: a.james.winterbottom@gmail.com
 End of changes. 116 change blocks. 
280 lines changed or deleted 276 lines changed or added

This html diff was produced by rfcdiff 1.42. The latest version is available from http://tools.ietf.org/tools/rfcdiff/