public final class JsonNominatimClient extends Object implements NominatimClient
| Constructor and Description |
|---|
JsonNominatimClient(org.apache.http.client.HttpClient httpClient,
String email)
Creates the json nominatim client.
|
JsonNominatimClient(String baseUrl,
org.apache.http.client.HttpClient httpClient,
String email,
BoundingBox searchBounds,
boolean strictBounds,
boolean polygon)
Creates the json nominatim client.
|
| Modifier and Type | Method and Description |
|---|---|
Address |
getAddress(double longitude,
double latitude)
Reverse geocode the given coordinates.
|
Address |
getAddress(double longitude,
double latitude,
int zoom)
Reverse geocode the given coordinates using a specific zoom level
|
Address |
getAddress(int longitudeE6,
int latitudeE6)
A convenience method to do the same as
NominatimClient.getAddress(double, double) but with int E6
latitude and longitude. |
Address |
getAddress(String type,
long id)
Reverse geocode the given OSM id.
|
List<Address> |
search(String query)
Search for results with the given query.
|
public JsonNominatimClient(org.apache.http.client.HttpClient httpClient,
String email)
httpClient - an HTTP clientemail - an email to add in the HTTP requests parameters to "sign" thempublic JsonNominatimClient(String baseUrl, org.apache.http.client.HttpClient httpClient, String email, BoundingBox searchBounds, boolean strictBounds, boolean polygon)
baseUrl - the nominatim server urlhttpClient - an HTTP clientemail - an email to add in the HTTP requests parameters to "sign" them (see
http://wiki.openstreetmap.org/wiki/Nominatim_usage_policy)searchBounds - the prefered search boundsstrictBounds - set to true if you want the results to be located into the given bounding boxpolygon - true to get results with polygon pointspublic List<Address> search(String query) throws IOException
search in interface NominatimClientquery - the queryIOException - a communication error occurredNominatimClient.search(java.lang.String)public Address getAddress(double longitude, double latitude) throws IOException
getAddress in interface NominatimClientlongitude - a longitudelatitude - a latitudenull if
no result foundIOException - a communication error occurredNominatimClient.getAddress(double, double)public Address getAddress(double longitude, double latitude, int zoom) throws IOException
getAddress in interface NominatimClientlongitude - a longitudelatitude - a latitudezoom - a osm zoom levelnull if
no result foundIOException - a communication error occurredNominatimClient.getAddress(double, double, int)public Address getAddress(int longitudeE6, int latitudeE6) throws IOException
NominatimClient.getAddress(double, double) but with int E6
latitude and longitude.getAddress in interface NominatimClientlongitudeE6 - a longitude E6latitudeE6 - a latitude E6null if
no result foundIOException - a communication error occurredNominatimClient.getAddress(int, int)public Address getAddress(String type, long id) throws IOException
getAddress in interface NominatimClienttype - An OSM type [N|W|R]id - An OSM idnull if no
result foundIOExceptionNominatimClient.getAddress(int, int)Copyright © 2013. All Rights Reserved.