| 1 |
{section:border=false} |
| 2 |
{column:width=70%} |
| 3 |
|
| 4 |
h1. Introduction |
| 5 |
For static locations, using Civic Address location descriptions would be the easiest method. As stated earlier though, you and your partners must agree on which description formats are acceptable. |
| 6 |
|
| 7 |
The following tables list the IANA registered element names that are currently accepted. The complete list of codes is defined in: |
| 8 |
[https://www.iana.org/assignments/civic-address-types-registry/civic-address-types-registry.xhtml] |
| 9 |
|
| 10 |
These codes were originally defined in [RFC4119|Geolocation Reference Information#rfc4119] and [RFC4776|Geolocation Reference Information#rfc4776] |
| 11 |
|| Label || Description || Example | |
| 12 |
| country | The country is identified by the two-letter ISO 3166 code.|US| |
| 13 |
| A1 | national subdivisions (state, region, province, prefecture)|New York| |
| 14 |
| A2 | county, parish, gun (JP), district (IN)|King's County| |
| 15 |
| A3 | city, township, shi (JP)|New York| |
| 16 |
| A4 | city division, borough, city, district, ward, chou (JP)|Manhattan| |
| 17 |
| A5 | neighborhood, block | Morningside Heights | |
| 18 |
| A6 | street\\NOTE: This code has been deprecated in favor of {{RD}}, defined below. | Broadway | |
| 19 |
| PRD | Leading street direction| N, W | |
| 20 |
| POD | Trailing street direction| SW | |
| 21 |
| STS | Street suffix | Avenue, Platz, Street| |
| 22 |
| HNO | House number, numeric part only|123| |
| 23 |
| HNS | House number suffix | A, 1/2 | |
| 24 |
| LMK | Landmark or vanity address|Low Library | |
| 25 |
| LOC | Additional location information\\NOTE: {{ROOM}} was added below.| Room 543 | |
| 26 |
| FLR | Floor | 5 | |
| 27 |
| NAM | Name (residence, business or office occupant)|Joe's Barbershop | |
| 28 |
| PC | Postal code | 10027-0401 | |
| 29 |
|
| 30 |
These codes were added in [RFC5139|Geolocation Reference Information#rfc5139] |
| 31 |
|
| 32 |
|| Label || Description || Example | |
| 33 |
| BLD | Building (structure) | Hope Theatre | |
| 34 |
| UNIT | Unit (apartment, suite) | 12a | |
| 35 |
| ROOM | Room | 450F | |
| 36 |
| PLC | Place-type | office | |
| 37 |
| PCN | Postal community name | Leonia | |
| 38 |
| POBOX | Post office box (P.O. box) | U40 | |
| 39 |
| ADDCODE | Additional Code | 13203000003 | |
| 40 |
| SEAT | Seat (desk, cubicle, workstation) | WS 181 | |
| 41 |
| RD | Primary road or street | Broadway | |
| 42 |
| RDSEC | Road section | 14 | |
| 43 |
| RDBR | Road branch | Lane 7 | |
| 44 |
| RDSUBBR | Road sub-branch | Alley 8 | |
| 45 |
| PRM | Road pre-modifier | Old | |
| 46 |
| POM | Road post-modifier | Service | |
| 47 |
|
| 48 |
These codes were added in [RFC6848|Geolocation Reference Information#rfc6848] |
| 49 |
|
| 50 |
|| Label || Description || Example | |
| 51 |
|PN|Post number that is attributed to a lamp post or utility pole.|21344567| |
| 52 |
|MP|Milepost: a marker indicating distance to or from a place (often a town) |
| 53 |
May actually be expressed in "miles" or "kilometers".|237.4| |
| 54 |
|STP|Street Type Prefix.|Boulevard| |
| 55 |
|HNP|House Number Prefix.|Z| |
| 56 |
|
| 57 |
h1. Example Configurations |
| 58 |
|
| 59 |
h2. Simple Example 1 |
| 60 |
In geolocation.conf, we can define a location that describes a building and profiles for Bob and Alice that add floor and room. We're assuming here that Bob's and Alice's phones don't send any location information themselves. |
| 61 |
{code} |
| 62 |
[building1] |
| 63 |
type = location |
| 64 |
format = civicAddress |
| 65 |
location_info = country=US, A1="New York", A3="New York", |
| 66 |
location_info = HNO=1633, PRD=W, RD=46th, STS=Street, PC=10222 |
| 67 |
method = Manual |
| 68 |
|
| 69 |
[alice] |
| 70 |
type = profile |
| 71 |
location_reference = building1 |
| 72 |
location_refinement = FLR=4, ROOM=4B20 |
| 73 |
|
| 74 |
[bob] |
| 75 |
type = profile |
| 76 |
location_reference = building1 |
| 77 |
location_refinement = FLR=32, ROOM=32A6 |
| 78 |
{code} |
| 79 |
|
| 80 |
h1. PIDF-LO XML Examples |
| 81 |
|
| 82 |
Here's what Alice's PIDF-LO would look like: |
| 83 |
{code} |
| 84 |
<?xml version="1.0" encoding="UTF-8"?> |
| 85 |
<presence entity="pres:[email protected]" |
| 86 |
xmlns="urn:ietf:params:xml:ns:pidf" |
| 87 |
xmlns:ca="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr" |
| 88 |
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" |
| 89 |
xmlns:gbp="urn:ietf:params:xml:ns:pidf:geopriv10:basicPolicy" |
| 90 |
xmlns:gml="http://www.opengis.net/gml" |
| 91 |
xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10" |
| 92 |
xmlns:gs="http://www.opengis.net/pidflo/1.0"> |
| 93 |
<dm:device> |
| 94 |
<gp:geopriv> |
| 95 |
<gp:location-info> |
| 96 |
<ca:civicAddress xml:lang="en-AU"> |
| 97 |
<ca:country>US</ca:country> |
| 98 |
<ca:A1>New York</ca:A1> |
| 99 |
<ca:A3>New York</ca:A3> |
| 100 |
<ca:HNO>1633</ca:HNO> |
| 101 |
<ca:PRD>W</ca:PRD> |
| 102 |
<ca:RD>46th</ca:RD> |
| 103 |
<ca:STS>Street</ca:STS> |
| 104 |
<ca:PC>10222</ca:PC> |
| 105 |
<ca:FLR>4</ca:FLR> |
| 106 |
<ca:ROOM>4B20</ca:ROOM> |
| 107 |
</ca:civicAddress> |
| 108 |
</gp:location-info> |
| 109 |
<gp:usage-rules> |
| 110 |
</gp:usage-rules> |
| 111 |
<gp:method>manual</gp:method> |
| 112 |
</gp:geopriv> |
| 113 |
<dm:deviceID>mac:1234567890ab</dm:deviceID> |
| 114 |
<dm:timestamp>2022-04-22T20:57:29Z</dm:timestamp> |
| 115 |
</dm:device> |
| 116 |
</presence> |
| 117 |
{code} |
| 118 |
|
| 119 |
Here's what Bob's PIDF-LO would look like: |
| 120 |
{code} |
| 121 |
<?xml version="1.0" encoding="UTF-8"?> |
| 122 |
<presence entity="pres:[email protected]" |
| 123 |
xmlns="urn:ietf:params:xml:ns:pidf" |
| 124 |
xmlns:ca="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr" |
| 125 |
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" |
| 126 |
xmlns:gbp="urn:ietf:params:xml:ns:pidf:geopriv10:basicPolicy" |
| 127 |
xmlns:gml="http://www.opengis.net/gml" |
| 128 |
xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10" |
| 129 |
xmlns:gs="http://www.opengis.net/pidflo/1.0"> |
| 130 |
<dm:device> |
| 131 |
<gp:geopriv> |
| 132 |
<gp:location-info> |
| 133 |
<ca:civicAddress xml:lang="en-AU"> |
| 134 |
<ca:country>US</ca:country> |
| 135 |
<ca:A1>New York</ca:A1> |
| 136 |
<ca:A3>New York</ca:A3> |
| 137 |
<ca:HNO>1633</ca:HNO> |
| 138 |
<ca:PRD>W</ca:PRD> |
| 139 |
<ca:RD>46th</ca:RD> |
| 140 |
<ca:STS>Street</ca:STS> |
| 141 |
<ca:PC>10222</ca:PC> |
| 142 |
<ca:FLR>32</ca:FLR> |
| 143 |
<ca:ROOM>32A6</ca:ROOM> |
| 144 |
</ca:civicAddress> |
| 145 |
</gp:location-info> |
| 146 |
<gp:usage-rules> |
| 147 |
</gp:usage-rules> |
| 148 |
<gp:method>manual</gp:method> |
| 149 |
</gp:geopriv> |
| 150 |
<dm:deviceID>mac:1234567890ab</dm:deviceID> |
| 151 |
<dm:timestamp>2022-04-22T20:57:29Z</dm:timestamp> |
| 152 |
</dm:device> |
| 153 |
</presence> |
| 154 |
{code} |
| 155 |
|
| 156 |
Note that the only civicAddress difference between the two are the {{FLR}} and {{ROOM}}. |
| 157 |
|
| 158 |
{column} |
| 159 |
{column:width=30%} |
| 160 |
Table of Contents: |
| 161 |
{toc} |
| 162 |
|
| 163 |
|
| 164 |
Geolocation: |
| 165 |
{pagetree:root=Geolocation|expandCollapseAll=true} |
| 166 |
{column} |
| 167 |
{section} |