Returns the nearest address to a given point of interest (specified as latitude/longitude).
Request Data
The following is a list of parameters that are required for this request.
Required Information | |
---|---|
Name | Description |
action | showposition |
operation | revgeocode |
format | xml |
long | the longitude of the point of interest |
lat | the latitude of the point of interest |
Data Returned
The address nearest to the given point of interest is returned in XML format. If no nearby address is found a standard error XML document is returned.
DTD
<!ELEMENT addresses (address*)> <!ATTLIST addresses count CDATA #REQUIRED> <!ATTLIST addresses lat CDATA #REQUIRED> <!ATTLIST addresses long CDATA #REQUIRED>
<!ELEMENT address (long, lat, distance, road, number, zip, county, state, country)>
<!ELEMENT long (#PCDATA)> <!ELEMENT lat (#PCDATA)> <!ELEMENT distance (#PCDATA)> <!ELEMENT road (#PCDATA)> <!ELEMENT number (#PCDATA)> <!ELEMENT zip (#PCDATA)> <!ELEMENT county (#PCDATA)> <!ELEMENT state (#PCDATA)> <!ELEMENT country (#PCDATA)>
Reply Data | |
---|---|
Name | Description |
long | the longitude of the returned point |
lat | the latitude of the returned point |
distance | distance between point of interest and the returned matching address. |
distance_unit | unit that distance is specified in |
road | the road name |
number | the building number |
zip | the zip code |
county | the county |
state | the state |
country | the country |
Example Request
https://omi.zonarsystems.net/interface.php?customer=zzo2544&username=zonar&password=secret.pw.2019&operation=revgeocode&action=showposition&long=-122.17286&lat=47.49497&format=xml
Example Success Reply (XML)
<?xml version="1.0"?>
<addresses count="1" long="-122.17286" lat="47.49497">
<address>
<long>-120.34567</long>
<lat>48.54781</lat>
<distance>6.800000</distance>
<road>Main St.</road>
<number>1002</number>
<zip>48778</zip>
<county>King</county>
<state>WA</state>
<country>USA</country>
</address>
</addresses>