mirror of
https://github.com/asterisk/asterisk.git
synced 2026-06-25 18:06:40 -07:00
e6d4e62a78
* 3d positions were being rendered without an enclosing `<gml:pos>` element resulting in invalid XML. * There was no way to set the `id` attribute on the enclosing `tuple`, `device` and `person` elements. * There was no way to set the value of the `deviceID` element. * Parsing of degree and radian UOMs was broken resulting in them appearing outside an XML element. * The UOM schemas for degrees and radians were reversed. * The Ellipsoid shape was missing and the Ellipse shape was defined multiple times. * The `crs` location_info parameter, although documented, didn't work. * The `pos3d` location_info parameter appears in some documentation but wasn't being parsed correctly. * The retransmission-allowed and retention-expiry sub-elements of usage-rules were using the `gp` namespace instead of the `gbp` namespace. In addition to fixing the above, several other code refactorings were performed and the unit test enhanced to include a round trip XML -> eprofile -> XML validation. Resolves: #1667 UserNote: Geolocation: Two new optional profile parameters have been added. * `pidf_element_id` which sets the value of the `id` attribute on the top-level PIDF-LO `device`, `person` or `tuple` elements. * `device_id` which sets the content of the `<deviceID>` element. Both parameters can include channel variables. UpgradeNote: Geolocation: In order to correct bugs in both code and documentation, the following changes to the parameters for GML geolocation locations are now in effect: * The documented but unimplemented `crs` (coordinate reference system) element has been added to the location_info parameter that indicates whether the `2d` or `3d` reference system is to be used. If the crs isn't valid for the shape specified, an error will be generated. The default depends on the shape specified. * The Circle, Ellipse and ArcBand shapes MUST use a `2d` crs. If crs isn't specified, it will default to `2d` for these shapes. The Sphere, Ellipsoid and Prism shapes MUST use a `3d` crs. If crs isn't specified, it will default to `3d` for these shapes. The Point and Polygon shapes may use either crs. The default crs is `2d` however so if `3d` positions are used, the crs must be explicitly set to `3d`. * The `geoloc show gml_shape_defs` CLI command has been updated to show which coordinate reference systems are valid for each shape. * The `pos3d` element has been removed in favor of allowing the `pos` element to include altitude if the crs is `3d`. The number of values in the `pos` element MUST be 2 if the crs is `2d` and 3 if the crs is `3d`. An error will be generated for any other combination. * The angle unit-of-measure for shapes that use angles should now be included in the respective parameter. The default is `degrees`. There were some inconsistent references to `orientation_uom` in some documentation but that parameter never worked and is now removed. See examples below. Examples... ``` location_info = shape="Sphere", pos="39.0 -105.0 1620", radius="20" location_info = shape="Point", crs="3d", pos="39.0 -105.0 1620" location_info = shape="Point", pos="39.0 -105.0" location_info = shape=Ellipsoid, pos="39.0 -105.0 1620", semiMajorAxis="20" semiMinorAxis="10", verticalAxis="0", orientation="25 degrees" pidf_element_id = ${CHANNEL(name)}-${EXTEN} device_id = mac:001122334455 Set(GEOLOC_PROFILE(pidf_element_id)=${CHANNEL(name)}/${EXTEN}) ```
35 lines
1.4 KiB
XML
35 lines
1.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<presence entity="pres:alice@asterisk.org"
|
|
xmlns="urn:ietf:params:xml:ns:pidf"
|
|
xmlns:ca="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr"
|
|
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
|
|
xmlns:gbp="urn:ietf:params:xml:ns:pidf:geopriv10:basicPolicy"
|
|
xmlns:gml="http://www.opengis.net/gml"
|
|
xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10"
|
|
xmlns:con="urn:ietf:params:xml:ns:geopriv:conf"
|
|
xmlns:gs="http://www.opengis.net/pidflo/1.0">
|
|
<tuple id="point-2d">
|
|
<status>
|
|
<gp:geopriv>
|
|
<gp:location-info>
|
|
<gml:Point srsName="urn:ogc:def:crs:EPSG::4326">
|
|
<gml:pos>-34.410649 150.87651</gml:pos>
|
|
</gml:Point>
|
|
<con:confidence pdf="normal">66</con:confidence>
|
|
</gp:location-info>
|
|
<gp:usage-rules>
|
|
<gbp:retransmission-allowed>no</gbp:retransmission-allowed>
|
|
<gbp:retention-expiry>2010-11-14T20:00:00Z</gbp:retention-expiry>
|
|
</gp:usage-rules>
|
|
<gp:method>Manual</gp:method>
|
|
<gp:note-well>
|
|
this is a test
|
|
of the emergency broadcast system
|
|
</gp:note-well>
|
|
</gp:geopriv>
|
|
</status>
|
|
<timestamp>2007-06-22T20:57:29Z</timestamp>
|
|
<dm:deviceID>mac:112233445566</dm:deviceID>
|
|
</tuple>
|
|
</presence>
|