Location service
geocode
Geocoding is the process of converting address string (like "141 5th Avenue, New York, NY, USA") into geographic coordinates (like latitude 37.423021 and longitude -122.083739).
| URL: | http://api.groundlink.com/locationservice/geocode.format |
| Formats: | xml, json, atom |
| Method(s): | GET |
Request
Parameters:
- query (required). Query which represent address string which need to be geocoded
Example:
http://api.groundlink.com/locationservice/geocode.xml?query=141 5 ave, New York, NY
Response
Returns: LocationResponse element
XML Example:
<location-response xmlns="http://api.groundlink.com/schema">
<locations>
<location>
<name>141 5th Ave, New York, NY 10010, USA</name>
<address>141 5th Ave</address>
<city>New York</city>
<postal-code>10010</postal-code>
<region>NY</region>
<country>US</country>
<latitude>40.739992</latitude>
<longitude>-73.990364</longitude>
<category>Address</category>
</location>
</locations>
</location-response>
JSON Example:
{"location-response":
{"locations":
{"location":
{"name":"John F Kennedy Airport, United States",
"address":" ",
"city":"",
"postal-code":"",
"region":"NY","country":"US",
"latitude":40.6424805,
"longitude":-73.788071,
"category":
"Airport"
}
}
}
}
reverseGeocode
Reverse geocoding is the process of finding a location for a given latitude/longitude pair.
This service method is currently not supported.| URL: | http://api.groundlink.com/locationservice/reverseGeocode.format |
| Formats: | xml, json, atom |
| Method(s): | GET |
Request
Parameters:
- latitude (required)
- longitude (required
Example:
http://api.groundlink.com/locationservice/reverseGeocode.xml?latitude=40.7405028&longitude=-73.9903663
Response
Returns: LocationResponse element
