67.0 Find Nearest Point (Forward Geocode)

67.2 Data Returned

Back to Index

The point nearest to the given address of interest can be returned in XML or JSON format. If no nearby address is found a standard error XML document or JSON object is returned.

DTD

<!ELEMENT points (point*)>
<!ATTLIST points count CDATA #REQUIRED>
<!ELEMENT point (external_id, longitude, latitude, altitude, confidence)>

<!ELEMENT external_id (#PCDATA)>
<!ELEMENT longitude (#PCDATA)>
<!ELEMENT latitude (#PCDATA)>
<!ELEMENT altitude (#PCDATA)>
<!ELEMENT confidence (#PCDATA)>

JSON

[{"external_id": int, "longitude": double, "latitude", double, "altitude": double, "confidence": int}]

Reply Data
Name Description
external_id The external ID of the respective address converted to point
latitude The latitude of the returned point
longitude The longitude of the returned point
altitude The altitude of the returned point
confidence The confidence of the returned point. This can be one of three values: Low, Medium, or High

 

Example request for one point (XML)

https://zonarsystems.net/interface.php?operation=forwardgeocode&action=showposition&format=xml&
amp;address=18200 Cascade Ave S&locality=Seattle&district=WA&zipcode=98188&external_id=1

Example Success Reply (XML)

Reply

Example request for more than one point (XML)

https://zonarsystems.net/interface.php?operation=forwardgeocode&action=showposition&format=xml&address[]=18200 Cascade Ave S
&locality[]=Seattle&district[]=WA&zipcode[]=98188&external_id[]=1&address[]=2151 E. Broadway Road
&locality[]=Tempe&district[]=AZ&zipcode[]=85282&external_id[]=2

Example Success Reply (XML)

Reply

When requesting the data as JSON the only difference between the requests is that the format parameter is set to json.

Example request for one point (JSON)

https://zonarsystems.net/interface.php?operation=forwardgeocode&action=showposition&format=json
&address=18200 Cascade Ave S&locality=Seattle&district=WA&zipcode=98188&external_id=1

Example Success Reply (JSON)

Reply

Example request for more than one point (JSON)

https://zonarsystems.net/interface.php?operation=forwardgeocode&action=showposition&format=json&address[]=18200 Cascade Ave S&locality[]=Seattle
&district[]=WA&zipcode[]=98188&external_id[]=1&address[]=2151 E. Broadway Road&locality[]=Tempe&district[]=AZ&zipcode[]=85282&external_id[]=2

Example Success Reply (JSON)

Reply

When requesting more than one point there must be the same number of fields for every address part. For example, if you are requesting two points there must be two address fields, two locality fields, two district fields, two zipcode fields and two external_id fields (if external_id given for any one of the addresses).

Is this api manual documents helpful?
0 out of 0 said Yes
YesNo