One document matched: draft-thomson-geopriv-indoor-location-00.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC4119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4119.xml">
<!ENTITY RFC5491 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5491.xml">
<!ENTITY RFC5139 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5139.xml">
<!ENTITY RFC3688 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3688.xml">
<!ENTITY RFC3986 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml">
<!ENTITY I-D.thomson-geopriv-uncertainty PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.thomson-geopriv-uncertainty.xml">
<!ENTITY I-D.ietf-geopriv-arch PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-geopriv-arch.xml">
<!ENTITY W3C.REC-xlink-20010627 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml4/reference.W3C.REC-xlink-20010627.xml">
]>
<?rfc rfcedstyle="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="no"?>
<?rfc iprnotified="yes"?>
<?rfc strict="yes"?>
<?rfc toc="yes"?>
<?rfc tocindent="yes"?>
<rfc category="std" ipr="trust200902">
<front>
<title abbrev="Indoor Location">
Locations with Locally-Defined Coordinate Reference Systems for the Presence Information Data Format - Location Object (PIDF-LO)
</title>
<author initials="M." surname="Thomson" fullname="Martin Thomson">
<organization>Andrew Corporation</organization>
<address>
<postal>
<street>Andrew Building (39)</street>
<street>Wollongong University Campus</street>
<street>Northfields Avenue</street>
<city>Wollongong</city>
<region>NSW</region>
<code>2522</code>
<country>AU</country>
</postal>
<email>martin.thomson@andrew.com</email>
</address>
</author>
<author initials="J." surname="Winterbottom" fullname="James Winterbottom">
<organization>Andrew Corporation</organization>
<address>
<postal>
<street>Andrew Building (39)</street>
<street>Wollongong University Campus</street>
<street>Northfields Avenue</street>
<city>Wollongong</city>
<region>NSW</region>
<code>2522</code>
<country>AU</country>
</postal>
<email>james.winterbottom@andrew.com</email>
</address>
</author>
<date month="October" year="2009"/>
<area>RAI</area>
<workgroup>GEOPRIV</workgroup>
<keyword>Internet-Draft</keyword>
<keyword>Indoor</keyword>
<keyword>CRS</keyword>
<keyword>Uncertainty</keyword>
<keyword>GML</keyword>
<abstract>
<t>A method is described for constructing a Presence Information Data Format - Location Object (PIDF-LO) document that contains location information using a locally-defined coordinate reference system (CRS). This form of representation allows for use of locally-defined coordinates with potential advantages for improved accuracy and usability in local context, in particular location applications that operate indoors. A framework for defining a local CRS is provided. A process for transformation of coordinates defined in the local CRS and the widely used World Geodetic System 1984 (WGS84) CRS is defined.
</t>
</abstract>
</front>
<middle>
<section title="Introduction">
<!-- <t>Determining the location of a device indoors or under cover is problematic. Obscured visibility to the open sky means that satellite positioning mechanisms such as GPS and assisted-GPS cannot be used. Walls, ceilings and floors all reflect radio signals which increases multi-path, reduces signal strength and introduces other radio interference. In addition to this, the exact position of indoor transceivers, such as 802.11 wireless access points, is also generally unknown. Techniques exist for determining the location of a WiFi device to within a few 10's of centremetres, but these locations are relative to the position of the WiFi access point, and there is currently no canonical way to be represented these locations in a PIDF-LO <xref target="RFC4119"/>.
</t>
<t>Relative coordinates are useful when it comes to placing markers on maps or floor plans, as they provide localized information that a a range of application may take advantage of. However, they provide little benefit for general applications that require a canonical location representation in WGS-84 coordinates or civic form. None of the LCPs defined in the IETF provide a service indicator to the LIS describing what the location information is going to be used for, so the LIS must assume that the location may be used for emergency purposes. This requires the LIS to express location information in a form that complies with the rules laid out in <xref target="RFC5491"/>.
</t> -->
<t>Providing location information in indoor environments presents new sets of technical challenges and use cases for location determination and representation. For use indoors, location information that is in a form specific to that locality can be both more accurate and more usable.
</t>
<t>The ability to specify relative coordinates simplifies the use of local applications, especially local mapping or navigation applications, which often rely on floor plan images or provide directions based on fixtures of the local environment.
</t>
<t>Within the confines of a building, or in any local context, location information might be determined in relation to fixtures in that environment. This might provide location information that is highly accurate within a local region, but errors are added if conversion to a globally useful form like World Geodetic System 1984 (WGS84) are required.
<list style="empty">
<t>For instance, wireless positioning systems within a building might provide excellent accuracy in relation to the wireless transmitters. However, in converting locations in a local reference frame to a globally applicable systems such as WGS84, these systems encounter difficulties.
</t>
<t>On the other hand, Global Navigation Satellite Systems (GNSS), which are widely used to generate location information, operate poorly indoors or anywhere an unobstructed view of the sky cannot be found.
</t>
</list>
For these cases and others like them, avoiding conversion steps ensures that unnecessary errors are not introduced.
</t>
<section title="Solution">
<t>A means to describe a location in relation to a fixed reference is defined. These locations use the forms defined in <xref target="OGC.GeoShape"/>, using a custom coordinate reference system (CRS).
</t>
<t>A form for defining a local CRS is described, such that locations in that CRS can be trivial translated to and from the World Geodetic System 1984 (WGS84) CRS used in PIDF-LO. This allows for location to be expressed in a canonical form, while preserving the location information for use in the local context.
</t>
<t>Guidelines are further provided for constructing a <xref target="RFC4119">Presence Information Data Format - Location Object (PIDF-LO) document</xref> so that existing applications and consumers of location information are able to operate. These guidelines are based on those described in <xref target="RFC5491">RFC 5491</xref>.
</t>
</section>
<section title="Example Use Case">
<t>A shopper uses the information contained in a PIDF-LO to identify the location of a store in a mall. The <xref target="OGC.GeoShape">geodetic location information</xref> or <xref target="RFC5139">civic address information</xref> helps the shopper identify the location of the mall.
</t>
<t>The relative, or indoor, location representation helps the shopper find the store within the mall. This information can be used together with a map of the mall, providing information in a form that is more readily usable to the shopper. The location of the store or the shopper can be overlaid on the provided map, aiding in finding the store.
</t>
<t>Transformation from WGS84 to the local CRS allows the shopper to use location determination methods that are not aware of the local CRS. Conversely, the location in the local CRS can be transformed into a geodetic location for use outside of the mall, or for applications that are unaware of the local context.
</t>
</section>
</section>
<section anchor="conventions" title="Conventions used in this document">
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <xref target="RFC2119"/>.
</t>
</section>
<section title="Overview">
<t>A location in a user-defined CRS is included in a PIDF-LO document as shown in <xref target="overview"/>, which includes the high-level elements involved.
</t>
<figure anchor="overview" title="PIDF-LO Structure Overview"><artwork><![CDATA[
<presence entity="pres:...">
<tuple id="geodetic"><status><geopriv> * geodetic tuple
<location-info>
<Circle srsName="urn:..." .../> * geodetic location
</location-info> ...
</geopriv></status></tuple>
<tuple id="indoor"><status><geopriv> * indoor tuple
<location-info>
<Circle srsName="#indoorCRS" .../> * indoor location
<ImageCRS ...> * image CRS
<srsName>#indoorCRS</srsName>
<usesCartesianCS .../> * image coordinates
<usesImageDatum>
<IndoorDatum .../> * indoor datum
</usesImageDatum>
</ImageCRS>
</location-info> ...
</geopriv></status></tuple>
</presence>
]]></artwork></figure>
<t>Two tuples are included in the PIDF-LO. One containing geodetic location information, the second containing locally defined coordinates. Depending on how the location generator operations, <xref target="transform">transformation</xref> might be used to construct one or other location element.
</t>
<t>The first <spanx style="verb">tuple</spanx> (or <spanx style="verb">device</spanx> or <spanx style="verb">person</spanx>) contains <xref target="OGC.GeoShape">geodetic information</xref>. This first tuple uses a WGS84 CRS, so that the information is usable outside of the local context.
<list style="empty"><t>Aside from being required by <xref target="RFC5491"/>, this ensures that overly simplistic processors that rely on tuple ordering do not erroneously assume the use of WGS84 with the subsequent shape information.</t></list>
</t>
<t>A second <spanx style="verb">tuple</spanx> includes location information using a <xref target="OGC.GML-3.1.1">Geography Markup Language (GML)</xref> geometry element, but using a custom, geo-referenced CRS in place of the WGS84 reference that is used for the geodetic shape. A formal definition of the CRS is included in the tuple with the shape.
</t>
<t>The CRS is defined only within the scope of the PIDF-LO. A URI fragment identifier is used to identify the CRS <spanx style="verb">srsName</spanx> parameters that reference the CRS.
</t>
<t>A reference to a GML dictionary containing the CRS MAY be used in place of the fragment identifier used in this document. An <spanx style="verb">http:</spanx> or <spanx style="verb">https:</spanx> URI MUST be used for this purpose unless an alternative scheme is known to be supported or recognized by recipients of the PIDF-LO. Authors of PIDF-LO documents that rely on providing a reference to the CRS need to have some assurance that all potential recipients of the location information are either able to resolve the reference or do not require the local information.
</t>
</section>
<section title="Generating Local Location Information">
<t>When creating location information for use in a local context, a coordinate reference system definition is required. Once the CRS is defined, the shapes from <xref target="OGC.GeoShape"/> can be used with an <spanx style="verb">srsName</spanx> attribute that references the newly defined CRS, rather than WGS84.</t>
<t>A GML <spanx style="verb">ImageCRS</spanx> element is used to define an image CRS. An image CRS is formed of an identifier and name, a coordinate system and a datum.
</t>
<t>The <spanx style="verb">gml:id</spanx> attribute of <spanx style="verb">ImageCRS</spanx> contains any valid XML name. The <spanx style="verb">srsName</spanx> includes a <xref target="RFC3986">URI fragment</xref> that refers to this identifier, this is the value that is used in the <spanx style="verb">srsName</spanx> in place of a WGS84 CRS URI. The local <spanx style="verb">codeSpace</spanx> of <spanx style="verb">#</spanx> is included to indicate that definition is only valid within the scope of this document:
</t>
<figure><artwork><![CDATA[
<gml:ImageCRS gml:id="officeCRS">
<gml:srsName codeSpace="#">#officeCRS</gml:srsName>
]]></artwork></figure>
<t>The CRS then needs a reference to the coordinate system defined in <xref target="imageCS">this document</xref>. This reference is provided using an <xref target="W3C.REC-xlink-20010627">XLink</xref> attribute:
</t>
<figure><artwork><![CDATA[
<gml:usesCartesianCS
xlink:href="urn:ietf:params:xml:schema:geopriv:indoor#i2d"/>
]]></artwork></figure>
<t>An image datum is used to define how the coordinate system then relates to the local environment. This uses the <spanx style="verb">IndoorDatum</spanx> element defined in <xref target="indoorDatum">this document</xref>. This uses similar identification to the CRS definition:
</t>
<figure><artwork><![CDATA[
<indoor:IndoorDatum gml:id="officeDatum"
xmlns:indoor="urn:ietf:params:xml:ns:geopriv:indoor">
<gml:datumName codeSpace="#">#officeDatum</gml:datumName>
...
</indoor:IndoorDatum>
]]></artwork></figure>
<t>An indoor datum requires a <xref target="origin">reference point</xref>, an <xref target="orientation">orientation</xref> angle, and a <xref target="scale">scaling factor</xref>. An indoor datum optionally includes a <xref target="address">civic address</xref>, a <xref target="offset">pixel offset</xref> and a <xref target="image">link to an image</xref>. A complete example document is included in <xref target="example"/>.
</t>
<t>If a map image is used as a reference, then pixel coordinates from an image can then be used directly.
</t>
</section>
<section anchor="imageCRS" title="Image-based Coordinate Reference System">
<t>A coordinate reference system (CRS) requires the definition of a coordinate system, and a description of how that coordinate system relates to a particular model of physical space.
</t>
<t><list style="hanging"><t hangText="Note:">This encoding specifically uses an image-based CRS, and provides a means to relate the information to a specific image. However, this CRS can be used in any local context, with or without an image, to describe the location in terms that are more useful within that context.
</t></list></t>
<t>The coordinate system used in relation to images is defined in this document. All images use the same coordinate system. Two coordinate systems are defined:
<list style="symbols">
<t>urn:ietf:params:xml:schema:geopriv:indoor#i3d</t>
<t>urn:ietf:params:xml:schema:geopriv:indoor#i2d</t>
</list>
</t>
<t>The datum that establishes the origin for the coordinate system is defined during construction of the PIDF-LO. The datum is specific to a particular location.
</t>
<t><xref target="example"/> shows an example definition of an coordinate reference system that include the definition of a location-specific image datum that corresponds to a floor plan.
</t>
<section anchor="imageCS" title="Image-based Coordinate System">
<t>A custom coordinate reference system (CRS) is defined for use in representing indoor locations. This allows positions to be expressed in relation to a floor plan or map.
</t>
<t><xref target="schema"/> includes the definition of two Cartesian coordinate systems. The two-dimensional Cartesian coordinate system is identified by the URN <spanx style="verb">urn:ietf:params:xml:schema:geopriv:indoor#i2d</spanx>. The three-dimensional Cartesian coordinate system is identified by the URN <spanx style="verb">urn:ietf:params:xml:schema:geopriv:indoor#i3d</spanx>.
</t>
<t>The two-dimensional coordinate system uses x- and y-axes to represent coordinates in relation to an image.</t>
<t>Location in relation to an image generally uses a coordinate system with an origin in the upper right. Values on the x-axis increase to the right and values on the y-axis increase towards the bottom. This coordinate system - inherited from the path that the beam in a Cathode-ray tube follows - inverts the y-axis from mathematical convention.
</t>
<figure>
<artwork><![CDATA[
----- x-axis ---->
O---------------------------+
| | |
| | |
y-axis | |
| | |
v | |
| |
+---------------------------+
]]></artwork>
</figure>
<t>A consequence of inverting the y-axis is that the z-axis is also inverted. </t>
<t>Any value containing altitude that is expressed in this coordinate system has the z-axis (altitude) inverted. A positive z-axis value corresponds to a point below the reference plane. A negative z-axis value corresponds to a point above the reference plane. That is, if the image is a map as viewed from above, altitude increases as values on the z-axis decrease.
<list style="empty"><t>An alternative would be to use different mathematical conventions within this coordinate system, which is inconvenient.</t></list>
</t>
<t>These two coordinate systems both use a unit of <xref target="uom">pixels</xref> to represent coordinates.</t>
</section>
<section anchor="indoorDatum" title="Local or Indoor Datum">
<t>The image datum establishes a relationship between the coordinate system and a physical space.
</t>
<t>An extension of the GML <spanx style="verb">ImageDatum</spanx> type is used to define a datum precisely. This definition allows for transformation between the local CRS and WGS84.
</t>
<section anchor="origin" title="Origin Point">
<t>This image datum identifies a point in space, using a geodetic shape. The <spanx style="verb">origin</spanx> element allows for the inclusion of any form of GML geometry, but this MUST use one of the shapes from <xref target="OGC.GeoShape"/>.
</t>
<t>A single reference point is derived from the provided shape. The <xref target="I-D.thomson-geopriv-uncertainty">centroid of the geodetic shape</xref> is used if the origin is included with uncertainty. This reference point is used to anchor the local datum, as well as establishing the plane of the horizontal.</t>
</section>
<section anchor="address" title="Origin Address">
<t>A geodetic reference point provides a basis for unambiguous transformation between locations in the locally-defined CRS and WGS84. For human consumption, <xref target="RFC5139">civic addresses</xref> are often more usable.
</t>
<t>A <spanx style="verb">civicAddress</spanx> element MAY be included in the <spanx style="verb">address</spanx> element to provide a user with more information about the reference point. The <spanx style="verb">LOC</spanx> field of the civic address can be used to provide a textual description of the reference point used.</t>
</section>
<section anchor="offset" title="Pixel Offset">
<t>The origin point is related to a point on the image, thus establishing a common point in both coordinate reference systems. Unless otherwise specified, the top-left corner pixel (0,0) of the image is used. The optional <spanx style="verb">offset</spanx> element includes the coordinates of the reference point in the local CRS - that is, the position of the reference point on the image.
</t>
</section>
<section anchor="orientation" title="Orientation">
<t>Maps for use within structures are only rarely produced with geodetic North toward the top of the image. Building maps are often oriented so that the majority of features do not appear at irregular angles on the map. Thus, the orientation of a local datum is often rotated.
</t>
<t>The <spanx style="verb">orientation</spanx> element describes the angle between North at the reference location (see <xref target="whatsup"/>) and the negative y-axis in the local datum. Increasing values rotate the image in a clockwise direction as viewed from above.
</t>
</section>
<section anchor="scale" title="Scaling">
<t>The <spanx style="verb">scale</spanx> element includes a value in pixels per meter that describes how coordinates in the local datum, specified in pixels, are translated to coordinates in meters.
</t>
<t>A scaling factor must be provided for each axis in the coordinate system. For a two-dimensional coordinate system, two values can be included to allow for different scaling along the x- and y-axis independently. For a three-dimensional coordinate system, three values can be specified for the x-, y- and z-axes.
</t>
<t>Alternatively, a single scaling value can be used to apply the same scaling factor to all coordinate components (x- and y-axes, and optionally the z-axis).
</t>
<section title="Implications of Scaling">
<t>A means is provided for the image-based coordinate system to have different scaling factors along each axis. While this provides for greater flexibility in accomodating images with varying aspect ratios, it also causes skewing of angles and distances.
</t>
<t>A consequence of this is that the unit of measure defined in this document - pixels - is context dependent. Values in pixels can only be reliably applied along the axis upon which they were designed. Therefore, distances are better expressed using meters.
</t>
<t>Distances cannot be calculated using the image-based coordinates directly unless the same scaling value is used on all axes. Individual components MUST first be converted to meters before any calculations are performed. This ensures that any resulting distances derived from these coordinates are correct.
<list style="empty">
<t>For instance, given scaling of (4, 5), the distance between (4, 12) and (9, 24) cannot be said to be 13 pixels because the values along the x-axis are a different unit to the values along the y-axis. To calculate a distance, the two points are first converted to coordinates in meters: (1, 2.4) and (1.25, 4.8). Then the distance can be calculated as 2.413 meters.
</t>
</list>
</t>
<t>Similarly, the azimuth of a vector cannot be directly determined using the components of the vector as express in pixels. Conversion of each component to meters is required.
</t>
</section>
<section title="Other Applications of Scaling">
<t>Local policy can dictate that coordinates are expressed in meters (or some other commonly used local distance measure). Because the pixel measure is context-dependent, its definition can be aligned with any measure type for local applications. In this way, the CRS definition is applied as an <xref target="OGC.GML-3.1.1">engineering CRS</xref>, without relying on a strict definition.
</t>
<t>In this case, scaling is used so that coordinates in pixels correspond to some other measure. In this case, a single scaling value ensures that the local measure is consistent across axes. An image reference SHOULD NOT be included to avoid any use of coordinates in relation to the image.
</t>
<t>Distance measures are still provided in meters to ensure that clients outside the local context can make use of the information.
</t>
</section>
</section>
<section anchor="image" title="Map Image">
<t>The optional <spanx style="verb">image</spanx> element includes an image, usually a map of the locality. This image might be used to display the associated location information to a user.
</t>
<t>Rather than include an image inline, this uses <xref target="W3C.REC-xlink-20010627">XLink</xref> to reference an image document. The <spanx style="verb">xlink:href</spanx> attribute contains a URL for the image. An <spanx style="verb">http:</spanx> or <spanx style="verb">https:</spanx> URI MUST be used unless the location generator is able to ensure that authorized recipients of this data are able to use other information.
</t>
</section>
<section anchor="pixelInCell" title="Pixel-Coordinate Relation">
<t>GML defines the <spanx style="verb">pixelInCell</spanx> element for image datums, allowing for fact that pixels have area. Whole integer values for coordinates can be anchored to any point in the rectangular area defined by a single pixel. The <spanx style="verb">pixelInCell</spanx> value determines where in an individual pixel coordinates with whole integer values lie.
</t>
<t>This document uses a single value for <spanx style="verb">pixelInCell</spanx>. The value <spanx style="verb">cellCenter</spanx>, which is defined to be in the code space <spanx style="verb">urn:ogc:def:pixelInCell:OGC:1.0:</spanx> (see <xref target="OGC.ImageCRS"/>) indicates that whole integer values for coordinates are found in the precise center of a pixel.
</t>
</section>
</section>
</section>
<section title="Considerations for Shape Representation">
<t>The set of shapes defined in <xref target="OGC.GeoShape"/> can be used with the indoor CRS defined using these guidelines.
</t>
<section anchor="z-axis" title="Z-Axis Inversion">
<t>The consequence of this inversion is that the upward normal of a <xref target="OGC.GeoShape">geodetic shape</xref> needs to be inverted to ensure that the resulting volume matches expectations (that is, upward normals are still required to point in a direction that matches expectations of "up").
</t>
<t>In practice, this does not require any changes to shape definitions. A Polygon is still specified in an anti-clockwise direction as viewed from above. However, the upward normal vector will have a negative inner product with the z-axis of the modified space.
</t>
</section>
<section title="Distances">
<t>Distances, such as radii or the semi-major and semi-minor axes of an ellipse, are represented in meters in the local system. The pixels unit cannot be used for distance measures.
</t>
</section>
<section title="Angles of Orientation">
<t>Angles of orientation in the image datum are measured from the negative y-axis (the line pointing to the top of an image), consistent with the way that North is represented in images. Thus, an angle of 0 degrees indicates a direction along the negative y-axis; an angle of 90 degrees indicates a direction along the positive x-axis.
</t>
</section>
</section>
<section anchor="transform" title="Coordinate Transformation">
<t>It is often important that location information be provided that can be used in a global context, as well as the local context. To that end, a means is provided to provide information necessary to transform shapes between the WGS84 CRS and the local CRS.
</t>
<t>A single point is selected in the image coordinate reference system. This might be the origin of the image (0, 0), or any other point. The corresponding point in WGS84 (latitude, longitude, altitude) is also identified.
</t>
<t>Selecting a point in each coordinate system establishes a reference point: an origin point. When converting, all coordinates are expressed relative to the corresponding point in the same coordinate system.
</t>
<t>The WGS84 origin point also establishes a reference plane for the image. The reference plane is the plane of the horizontal at that point - the plane tangential to the WGS84 ellipsoid at the reference point. This plane, along with the orientation angle, are used to create a transformation matrix.
</t>
<section title="Conversion from WGS84 to Local CRS">
<t>To convert coordinates specified in WGS84 to coordinates specified in the local CRS use the following algorithm:
<list style="numbers">
<t>If the coordinates do not include altitude, add an altitude of zero. This will be removed from the final result, but an altitude value is required for this algorithm.
</t>
<t>Convert the WGS84 (latitude, longitude, altitude) coordinates to WGS84 ECEF (X, Y, Z) values. One commonly used algorithm for this is documented in <xref target="I-D.thomson-geopriv-uncertainty"/>.
</t>
<t>If necessary, find the centroid of the reference location, specified in the <spanx style="verb">origin</spanx> element, in WGS84 ECEF (X, Y, Z) coordinates. Algorithms for this are documented in <xref target="I-D.thomson-geopriv-uncertainty"/>.
</t>
<t>Subtract the ECEF reference location from the ECEF coordinates to get a relative position vector for the coordinates.
</t>
<t>Multiply the resulting relative position by the forward transformation matrix described in <xref target="matrix"/>. This gives distances in meters for each of the axes of the image coordinate system.
</t>
<t>Multiply each component of the vector by the scaling factor, specified in the <spanx style="verb">scale</spanx> element, to obtain values in pixels.
</t>
<t>Add the resulting value to the image offset, specified in the <spanx style="verb">offset</spanx> element, to obtain the coordinates in the local CRS.
</t>
<t>If altitude was not originally provided, remove any vertical or z-axis component.
</t>
<t>If the reference location contains uncertainty, add this uncertainty to any uncertainty in the original location, see <xref target="extraunc"/>.
</t>
</list>
</t>
<figure><preamble>The results can be summarized as:</preamble>
<artwork><![CDATA[
C[local] = offset + scale .* R * T[0] * (C[ecef] - R[ecef])
]]></artwork>
<postamble>Where all coordinates are expressed as column vectors, <spanx style="verb">*</spanx> is the matrix product and <spanx style="verb">.*</spanx> is the Hadamard or entrywise product.</postamble>
</figure>
</section>
<section title="Conversion from Local CRS to WGS">
<t>To convert coordinates specified in the local CRS to coordinates specified in WGS84 use the following algorithm:
<list style="numbers">
<t>If the coordinates do not include a vertical or z-axis component, set this value to zero.
</t>
<t>Subtract the image offset from the coordinate values.
</t>
<t>Divide each component of the vector by the scaling factor.
</t>
<t>Multiply the resulting relative position by the reverse transformation matrix described in <xref target="matrix"/> to get a vector relative to the reference location.
</t>
<t>If necessary, find the centroid of the reference location, <spanx style="verb">origin</spanx>, in WGS84 ECEF (X, Y, Z) coordinates.
</t>
<t>Add the ECEF reference location to the ECEF coordinates.
</t>
<t>Convert the WGS84 ECEF (X, Y, Z) coordinates to WGS84 (latitude, longitude, altitude) values.
</t>
<t>If vertical or z-axis values were not provided, remove the altitude value.
</t>
<t>If the reference location contains uncertainty, add this uncertainty to any uncertainty in the original location.
</t>
</list>
</t>
<figure><preamble>The results can be summarized as:</preamble>
<artwork><![CDATA[
C[ecef] = (1/scale) .* transpose(R * T[0]) * (C[local] - offset)
+ R[ecef]
]]></artwork>
<postamble>Where <spanx style="verb">transpose(...)</spanx> signifies the matrix transpose and <spanx style="verb">1/scale</spanx> is 1 divided by the scaling factor.</postamble>
</figure>
</section>
<section anchor="matrix" title="Transformation Matrix">
<t>The transformation matrix used to convert coordinates between WGS84 and the local CRS uses the centroid of the origin location, contained in the <spanx style="verb">origin</spanx> element.
</t>
<t>The transformation matrix is formed from the North, East and Up vectors from the origin location. <xref target="whatsup"/> describes how to determine these vectors in WGS84 ECEF coordinates:
</t>
<figure><artwork><![CDATA[
East = [ -sinlng ; coslng ; 0 ]
North = [ -sinlat * coslng ; -sinlat * sinlng ; coslat ]
Up = [ coslat * coslng ; coslat * sinlng ; sinlat ]
]]></artwork></figure>
<t>Without rotation, the x-axis of the coordinate system corresponds to East, the y-axis corresponds to the negative North vector and the z-axis corresponds to the negative Up vector. This gives the following transformation matrix for the case where the orientation is zero:
</t>
<figure><artwork><![CDATA[
[ -sinlng ; coslng ; 0 ]
T[0] = [ sinlat * coslng ; sinlat * sinlng ; -coslat ]
[ -coslat * coslng ; -coslat * sinlng ; -sinlat ]
]]></artwork></figure>
<t>The orientation of the map, included in the <spanx style="verb">orientation</spanx> element, affects the x-axis and y-axis parts of this matrix. The rotation matrix is a counter-clockwise rotation matrix, as follows:
</t>
<figure><artwork><![CDATA[
[ cos(orientation) ; -sin(orientation) ; 0 ]
R = [ sin(orientation) ; cos(orientation) ; 0 ]
[ 0 ; 0 ; 1 ]
]]></artwork></figure>
<t>Both <spanx style="verb">R</spanx> and <spanx style="verb">T[0]</spanx> perform rotations. The final transformation matrix is then the product of the rotation matrix and the coordinate transformation matrix. This gives the following orthonormal coordinate transformation matrix.
</t>
<figure><artwork><![CDATA[
T = R * T[0]
]]></artwork></figure>
<t>When transforming from local coordinates to WGS84, the transformation matrix is transposed to find its inverse.
</t>
</section>
<section title="Polygons and Prisms">
<t>Each point in a Polygon or Prism is transformed independently using the same process. The transformation process causes the direction of the points to be reversed. Therefore, no additional steps are required to ensure the correct orientation of the upward normal a Polygon or Prism.
</t>
</section>
<section title="Angles of Orientation">
<t>Translation of Ellipse, Ellipsoid and ArcBand shapes requires that the included angle measures are rotated. When translating from the local coordinate reference system, the orientation of the image datum is added to the angle. The orientation of the image datum is subtracted when translating from WGS84 coordinates.
</t>
</section>
<section anchor="extraunc" title="Managing Uncertainty">
<t>The WGS84 origin location MAY include uncertainty if that location is not sufficiently accurate. In this case, the centroid of the uncertainty region is used as the origin point. The uncertainty in this location increases any uncertainty when performing a transformation.
</t>
<t>An increase to uncertainty is applied when transforming both to and from WGS84. Repeated transformations can increase uncertainty indefinitely.
</t>
<t>Converting the origin location and the target shape to a Circle or Sphere prior to transformation simplifies the management of uncertainty. The resulting uncertainty radius is the sum of the radius from the original shape, plus the radius from the origin location.
</t>
</section>
</section>
<section anchor="example" title="Example PIDF-LO">
<figure><preamble>The following example PIDF-LO document contains geodetic location in the first tuple, followed by a similar location in the local CRS. All optional elements are included in this example.</preamble>
<artwork><![CDATA[
<presence xmlns="urn:ietf:params:xml:ns:pidf"
xmlns:gml="http://www.opengis.net/gml"
xmlns:gs="http://www.opengis.net/pidflo/1.0"
xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10"
xmlns:xlink="http://www.w3.org/1999/xlink"
entity="pres:ae3be8585902e2253ce2@lis.example">
<tuple id="geodeticLocation">
<status>
<gp:geopriv>
<gp:location-info>
<gs:Circle srsName="urn:ogc:def:crs:EPSG::4326">
<gml:pos>-34.407124 150.882673</gml:pos>
<gs:radius uom="urn:ogc:def:uom:EPSG::9001">3
</gs:radius>
</gs:Circle>
</gp:location-info>
<gp:usage-rules/>
</gp:geopriv>
</status>
</tuple>
<tuple id="indoorLocation">
<status>
<gp:geopriv>
<gp:location-info>
<gs:Circle srsName="#officeCRS">
<gml:pos>47.5 22</gml:pos>
<gs:radius uom="urn:indoor:dict#pixels">30
</gs:radius>
</gs:Circle>
<gml:ImageCRS gml:id="officeCRS">
<gml:srsName codeSpace="#">#officeCRS</gml:srsName>
<gml:usesCartesianCS
xlink:href="urn:ietf:params:xml:schema:geopriv:indoor#i2d"/>
<gml:usesImageDatum>
<indoor:IndoorDatum gml:id="officeDatum"
xmlns:indoor="urn:ietf:params:xml:ns:geopriv:indoor">
<gml:datumName
codeSpace="#">#officeDatum</gml:datumName>
<gml:pixelInCell
codeSpace="urn:ogc:def:pixelInCell:OGC:1.0:"
>cellCenter</gml:pixelInCell>
<indoor:origin>
<gs:Circle srsName="urn:ogc:def:crs:EPSG::4326">
<gml:pos>-34.407168 150.882533</gml:pos>
<gs:radius uom="urn:ogc:def:uom:EPSG::9001">5
</gs:radius>
</gs:Circle>
</indoor:origin>
<indoor:address>
<ca:civicAddress xml:lang="en"
xmlns:ca="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr">
<ca:country>AU</ca:country>
<ca:A1>NSW</ca:A1>
<ca:A3>Wollongong</ca:A3>
<ca:A4>Gwynneville</ca:A4>
<ca:RD>Northfields</ca:RD>
<ca:STS>Avenue</ca:STS>
<ca:LMK>University of Wollongong</ca:LMK>
<ca:LOC>Director's Office</ca:LOC>
<ca:FLR>2</ca:FLR>
<ca:NAM>Andrew Corporation</ca:NAM>
<ca:PC>2500</ca:PC>
<ca:BLD>39</ca:BLD>
<ca:PLC>office</ca:PLC>
</ca:civicAddress>
</indoor:address>
<indoor:offset
uom="urn:ietf:params:xml:schema:geopriv:indoor#px">374 184
</indoor:offset>
<indoor:orientation
uom="urn:ogc:def:uom:EPSG::9102">8.4
</indoor:orientation>
<indoor:scale
uom="urn:ietf:params:xml:schema:geopriv:indoor#pxpm">20
</indoor:scale>
<indoor:image
xlink:href="http://example/floorplan.png"/>
</indoor:IndoorDatum>
</gml:usesImageDatum>
</gml:ImageCRS>
</gp:location-info>
<gp:usage-rules/>
<gp:method>RSSI-RTT</gp:method>
</gp:geopriv>
</status>
</tuple>
</presence>
]]></artwork></figure>
</section>
<section title="GML Definitions">
<t>Formal GML definitions a coordinate reference system are provided in the PIDF-LO. However, these definitions rely on the definitions in this document, plus the formal GML definitions included in <xref target="schema">the schema</xref>.
</t>
<t>This section provides references to definitions of the various code points used in the formal definitions.
</t>
<section anchor="uom" title="Units of Measure">
<t>This document uses the same restricted set of units of measure as defined in <xref target="RFC5491"/>, with additions for the local CRS.
</t>
<t>The units for meters (urn:ogc:def:uom:EPSG::9001), degrees (urn:ogc:def:uom:EPSG::9102) and radians (urn:ogc:def:uom:EPSG::9101) are used where applicable. Meters are used for all distance measures. Degrees or radians are used for all angular measures.
</t>
<t>Additional units of measure are defined for pixels (urn:ietf:params:xml:schema:geopriv:indoor#px) and pixels per meter (urn:ietf:params:xml:schema:geopriv:indoor#pxpm). Formal definitions of these units are included in an annotation to the XML schema. Pixels are used to describe coordinates in the local datum. Pixels per meter are used to establish a scale for conversion between meters (used in WGS84) and pixels (used in the local CRS).
</t>
<t>A pixel is nominally a length measure in this definition. However, this definition does not relate the measure to any other form of length measure. The pixel measure is context-dependent and can be related to other length measures by different factors. The <xref target="scale">scaling</xref> parameters of the datum establish how pixels relate to other measures, such as meters.
</t>
</section>
<section anchor="codeSpace" title="Code Space Definitions">
<t>The GML definitions for the local coordinate system rely on identifiers that are defined in the <spanx style="verb">http://ietf.org/rfc/rfcXXXX.txt</spanx> (the URL of this document [[EDITOR NOTE: Please update this link at publication]]). These identifiers are defined thus:
<list style="hanging">
<t hangText="ix">The x-axis of the image-based coordinate system.
</t>
<t hangText="iy">The y-axis of the image-based coordinate system.
</t>
<t hangText="iz">The z-axis of the image-based coordinate system.
</t>
<t hangText="east+o">East from the reference point, rotated clockwise (about the Up vector) by the orientation angle, see <xref target="whatsup"/> and <xref target="matrix"/>.
</t>
<t hangText="south+o">South from the reference point, rotated clockwise (about the Up vector) by the orientation angle, see <xref target="whatsup"/> and <xref target="matrix"/>.
</t>
<t hangText="down">Down from the reference point, see <xref target="whatsup"/> and <xref target="matrix"/>.
</t>
<t hangText="pixel">The name for the pixels unit of measure, see <xref target="uom"/>.
</t>
<t hangText="px">The abbreviated name for the pixels unit of measure.
</t>
<t hangText="pixels per metre">The English name for the pixels per meter unit of measure, using the standard spelling, see <xref target="uom"/>.
</t>
<t hangText="pixels per meter">The US English name for the pixels per meter unit of measure.
</t>
<t hangText="pxpm">The abbreviated name for the pixels per meter unit of measure.
</t>
</list>
</t>
<t>Documents created by this document will use a document-local code space, signified by use of the URI fragment: <spanx style="verb">#</spanx>.
</t>
</section>
</section>
<section anchor="schema" title="XML Schema">
<t>The XML schema for the indoor location elements also includes a definition of the 2-dimensional and 3-dimensional image-based coordinate systems and units of measure used in definitions of coordinate reference systems.
<list style="empty">
<t>To identify the elements that are defined in this schema, a URI is used. This document is not identified by a URL, instead it uses the URN that is registered for identification of the schema <spanx style="verb">urn:ietf:params:xml:schema:geopriv:indoor</spanx>.</t>
</list>
</t>
<figure>
<artwork><![CDATA[
<?xml version="1.0"?>
<xs:schema
xmlns:in="urn:ietf:params:xml:ns:geopriv:indoor"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:gml="http://www.opengis.net/gml"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:ca="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr"
targetNamespace="urn:ietf:params:xml:ns:geopriv:indoor"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<!-- [[NOTE TO RFC-EDITOR: Please replace all instances of the URL
'http://ietf.org/rfc/rfcXXXX.txt' with the URL of published
document and remove this note.]] -->
<xs:annotation>
<xs:appinfo
source="urn:ietf:params:xml:schema:geopriv:indoor">
Indoor Location for PIDF-LO
<!-- These definitions use the code-space definition
'http://ietf.org/rfc/rfcXXXX.txt' -->
<gml:Dictionary gml:id="defs">
<gml:description>
A dictionary including a Cartesian Coordinate System and
units of measure for a system of indoor location.
</gml:description>
<gml:name>Indoor Location</gml:name>
<!-- urn:ietf:params:xml:schema:geopriv:indoor#i3d -->
<gml:dictionaryEntry>
<gml:CartesianCS gml:id="i3d">
<gml:usesAxis>
<gml:CoordinateSystemAxis uom="#px">
<gml:axisAbbrev
codeSpace="http://ietf.org/rfc/rfcXXXX.txt"
>x</gml:axisAbbrev>
<gml:axisDirection
codeSpace="http://ietf.org/rfc/rfcXXXX.txt"
>east+o</gml:axisDirection>
</gml:CoordinateSystemAxis>
</gml:usesAxis>
<gml:usesAxis>
<gml:CoordinateSystemAxis uom="#px">
<gml:axisAbbrev
codeSpace="http://ietf.org/rfc/rfcXXXX.txt"
>y</gml:axisAbbrev>
<gml:axisDirection
codeSpace="http://ietf.org/rfc/rfcXXXX.txt"
>south-o</gml:axisDirection>
</gml:CoordinateSystemAxis>
</gml:usesAxis>
<gml:usesAxis>
<gml:CoordinateSystemAxis uom="#px">
<gml:axisAbbrev
codeSpace="http://ietf.org/rfc/rfcXXXX.txt"
>z</gml:axisAbbrev>
<gml:axisDirection
codeSpace="http://ietf.org/rfc/rfcXXXX.txt"
>down</gml:axisDirection>
</gml:CoordinateSystemAxis>
</gml:usesAxis>
</gml:CartesianCS>
</gml:dictionaryEntry>
<!-- urn:ietf:params:xml:schema:geopriv:indoor#i2d -->
<gml:dictionaryEntry>
<gml:CartesianCS gml:id="i2d">
<gml:usesAxis>
<gml:CoordinateSystemAxis uom="#px">
<gml:axisAbbrev
codeSpace="http://ietf.org/rfc/rfcXXXX.txt"
>x</gml:axisAbbrev>
<gml:axisDirection
codeSpace="http://ietf.org/rfc/rfcXXXX.txt"
>east+o</gml:axisDirection>
</gml:CoordinateSystemAxis>
</gml:usesAxis>
<gml:usesAxis>
<gml:CoordinateSystemAxis uom="#px">
<gml:axisAbbrev
codeSpace="http://ietf.org/rfc/rfcXXXX.txt"
>y</gml:axisAbbrev>
<gml:axisDirection
codeSpace="http://ietf.org/rfc/rfcXXXX.txt"
>south-o</gml:axisDirection>
</gml:CoordinateSystemAxis>
</gml:usesAxis>
</gml:CartesianCS>
</gml:dictionaryEntry>
<!-- urn:ietf:params:xml:schema:geopriv:indoor#px -->
<gml:dictionaryEntry>
<gml:BaseUnit gml:id="px">
<gml:description>
The pixel is the basic unit of measure used in images.
</gml:description>
<gml:name codeSpace="http://ietf.org/rfc/rfcXXXX.txt"
>pixel</gml:name>
<gml:quantityType>image quanta</gml:quantityType>
<gml:catalogSymbol
codeSpace="http://ietf.org/rfc/rfcXXXX.txt"
>px</gml:catalogSymbol>
<gml:unitsSystem
xlink:href="http://ietf.org/rfc/rfcXXXX.txt"/>
</gml:BaseUnit>
</gml:dictionaryEntry>
<!-- urn:ietf:params:xml:schema:geopriv:indoor#ppm -->
<gml:dictionaryEntry>
<gml:DerivedUnit gml:id="pxpm">
<gml:description>
A mapping of length in pixels to a length in metres.
</gml:description>
<gml:name codeSpace="http://ietf.org/rfc/rfcXXXX.txt"
>pixels per metre</gml:name>
<gml:name codeSpace="http://ietf.org/rfc/rfcXXXX.txt"
xml:lang="en-US">pixels per meter</gml:name>
<gml:quantityType>
mapping of pixels to length
</gml:quantityType>
<gml:catalogSymbol
codeSpace="http://ietf.org/rfc/rfcXXXX.txt"
>pxpm</gml:catalogSymbol>
<gml:derivationUnitTerm uom="#px" exponent="1"/>
<gml:derivationUnitTerm uom="urn:ogc:def:uom:EPSG::9001"
exponent="-1"/>
</gml:DerivedUnit>
</gml:dictionaryEntry>
</gml:Dictionary>
</xs:appinfo>
<xs:documentation source="http://ietf.org/rfc/rfcXXXX.txt">
This schema defines a location representation that allows for
the trivial creation of a locally-defined coordinate reference
system; specifically one that is based on a local map image.
</xs:documentation>
</xs:annotation>
<xs:import namespace="http://www.opengis.net/gml"/>
<xs:import namespace="http://www.w3.org/1999/xlink"/>
<xs:import
namespace="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr"/>
<xs:element name="IndoorDatum" type="in:IndoorDatumType"
substitutionGroup="gml:ImageDatum"/>
<xs:complexType name="IndoorDatumType">
<xs:complexContent>
<xs:extension base="gml:ImageDatumType">
<xs:sequence>
<xs:element name="origin"
type="gml:GeometryPropertyType"/>
<xs:element name="address"
type="in:addressType" minOccurs="0"/>
<xs:element name="offset"
type="gml:MeasureListType" minOccurs="0"/>
<xs:element name="orientation"
type="gml:AngleType"/>
<xs:sequence minOccurs="0">
<xs:element name="scale"
type="gml:MeasureListType"/>
<xs:element name="image"
type="in:linkType" minOccurs="0"/>
</xs:sequence>
<xs:any namespace="##other" processContents="lax"
minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="linkType">
<xs:complexContent>
<xs:restriction base="xs:anyType">
<xs:sequence>
<xs:any namespace="##other" processContents="lax"
minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attributeGroup ref="xlink:simpleLink"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="addressType">
<xs:complexContent>
<xs:restriction base="xs:anyType">
<xs:sequence>
<xs:element ref="ca:civicAddress"/>
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:schema>
]]></artwork>
</figure>
</section>
<section anchor="security" title="Security Considerations">
<t>This document describes information that is intended for inclusion within a location object, specifically a PIDF-LO. The security concerns relating to the use of a location object are described in <xref target="RFC4119"/>. Further security and privacy considerations are included in <xref target="I-D.ietf-geopriv-arch"/>. No further considerations are known to apply.
</t>
</section>
<section anchor="iana" title="IANA Considerations">
<t>This section registers a URN for the identification of XML elements for describing a local CRS, plus the schema that defines those elements.</t>
<section anchor="iana-ns" title="URN Sub-Namespace Registration for 'urn:ietf:params:xml:ns:geopriv:indoor'">
<t>This section registers a new XML namespace, <spanx style="verb">urn:ietf:params:xml:ns:geopriv:indoor</spanx>, per the guidelines in <xref target="RFC3688"/>.
<list style="empty">
<t>URI: urn:ietf:params:xml:ns:geopriv:indoor</t>
<t>Registrant Contact: IETF, GEOPRIV working group, (geopriv@ietf.org), Martin Thomson (martin.thomson@andrew.com).</t>
<t>XML: <figure>
<artwork><![CDATA[
BEGIN
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GEOPRIV: Indoor location representation</title>
</head>
<body>
<h1>Namespace for Indoor location representation</h1>
<h2>urn:ietf:params:xml:ns:geopriv:indoor</h2>
[NOTE TO IANA/RFC-EDITOR: Please replace XXXX
with the RFC number for this specification.]
<p>See RFCXXXX</p>
</body>
</html>
END
]]></artwork>
</figure></t>
</list></t>
</section>
<section anchor="iana-schema" title="XML Schema Registration">
<t>This section registers an XML schema as per the guidelines in <xref target="RFC3688"></xref>.
<list style="hanging">
<t hangText="URI:">urn:ietf:params:xml:schema:geopriv:indoor</t>
<t hangText="Registrant Contact:">IETF, GEOPRIV working group, (geopriv@ietf.org), Martin Thomson (martin.thomson@andrew.com).
</t>
<t hangText="Schema:">
The XML for this schema can be found in <xref target="schema"></xref> of this document starting with <spanx style="verb"><xs:schema</spanx> and ending with <spanx style="verb"></xs:schema></spanx>.
</t>
</list></t>
</section>
</section>
<section title="Acknowledgements">
<t>
</t>
</section>
<!--
<appendix title="Change Log">
<t>[[The RFC Editor is requested to remove this section at publication.]]</t>
<t>Changes since -0-1:
<list style="symbols">
<t>Document created.</t>
</list>
</t>
</appendix>
-->
</middle>
<back>
<references title="Normative References">
&RFC2119;
&RFC4119;
&RFC5139;
&RFC5491;
<reference anchor="OGC.GeoShape">
<front>
<title abbrev="GeoShape">GML 3.1.1 PIDF-LO Shape Application Schema for use by the Internet Engineering Task Force (IETF)</title>
<author initials="M." surname="Thomson" fullname="Martin Thomson">
<organization>Andrew Corporation</organization>
</author>
<author initials="C." surname="Reed" fullname="Carl Reed, PhD.">
<organization>Open Geospatial Consortium Inc.</organization>
</author>
<date month="April" day="10" year="2007"/>
</front>
<seriesInfo name="OGC Best Practice"
value="06-142r1, Version: 1.0"/>
</reference>
&W3C.REC-xlink-20010627;
<reference anchor="OGC.ImageCRS" target="http://portal.opengeospatial.org/files/?artifact_id=10048">
<front>
<title abbrev="ImageCRS">Recommended XML/GML 3.1.1 encoding of image CRS definitions</title>
<author initials="A" surname="Whiteside" fullname="Arliss Whiteside">
<organization />
</author>
<date month="April" day="14" year="2005" />
<abstract>
<t>This expanded OGC Recommendation Paper specifies XML encoding of data defining image coordinate reference systems and coordinate operations.
</t>
</abstract>
</front>
<seriesInfo name="OGC Recommendation Paper" value="05-027r1" />
</reference>
</references>
<references title="Informative References">
&RFC3688;
&RFC3986;
<reference anchor="OGC.GML-3.1.1" target="http://portal.opengeospatial.org/files/?artifact_id=4700">
<front>
<title>Geographic information - Geography Markup Language (GML)</title>
<author initials="S" surname="Cox" fullname="Simon Cox">
<organization />
</author>
<author initials="P" surname="Daisey" fullname="Paul Daisey">
<organization />
</author>
<author initials="R" surname="Lake" fullname="Ron Lake">
<organization />
</author>
<author initials="C" surname="Portele" fullname="Clemens Portele">
<organization />
</author>
<author initials="A" surname="Whiteside" fullname="Arliss Whiteside">
<organization />
</author>
<date month="April" day="19" year="2004" />
<abstract>
<t>Geography Markup Language is an XML grammar written in XML Schema for the modelling, transport, and storage of geographic information.
</t>
</abstract>
</front>
<seriesInfo name="OpenGIS" value="03-105r1" />
</reference>
&I-D.ietf-geopriv-arch;
&I-D.thomson-geopriv-uncertainty;
</references>
<section anchor="whatsup" title="Calculating WGS84 ECEF Up, North and East Vectors">
<t>Unit vectors corresponding to Up, North and East from a given point are used for transformation of coordinates between WGS84 and the local CRS. These vectors are provided in the Cartesian coordinate system used by WGS84: the Earth-Centered, Earth-Fixed (ECEF) variant of WGS84 (X, Y, Z).
</t>
<t>These vectors change depending on location, but depend only on latitude and longitude; the altitude of the point has no affect on the vectors.
</t>
<t>The following values are used (where sin(x) is the sine function of x and cos(x) the cosine function): coslat = cos(latitude); sinlat = sin(latitude); coslng = cos(longitude); sinlng = sin(longitude).
</t>
<figure>
<preamble>When calculating the orientation of Up, North and East vectors in Earth-Centered, Earth-Fixed (ECEF) coordinates, inverse flattening of the WGS84 ellipsoid is not considered. These vectors are:</preamble>
<artwork><![CDATA[
East = [ -sinlng ; coslng ; 0 ]
North = [ -sinlat * coslng ; -sinlat * sinlng ; coslat ]
Up = [ coslat * coslng ; coslat * sinlng ; sinlat ]
]]></artwork>
<postamble>These are all orthogonal unit vectors, therefore the matrix they form is also orthogonal.</postamble>
</figure>
<figure>
<preamble>The Up vector plus the ECEF coordinates of a point defines the plane of the horizontal at that point:</preamble>
<artwork><![CDATA[
(x - c[x]) * Up[x] + (y - c[y]) * Up[y] + (z - c[z]) * Up[z] = 0
]]></artwork>
</figure>
</section>
</back>
</rfc>
| PAFTECH AB 2003-2026 | 2026-04-24 04:28:30 |