public final class JsonNominatimClient extends Object implements NominatimClient
| Modifier and Type | Field and Description |
|---|---|
static String |
ENCODING_UTF_8
UTF-8 encoding.
|
| Constructor and Description |
|---|
JsonNominatimClient(org.apache.http.client.HttpClient httpClient,
String email)
Creates the json nominatim client with the default base URL (.
|
JsonNominatimClient(org.apache.http.client.HttpClient httpClient,
String email,
NominatimOptions defaults)
Creates the json nominatim client with the default base URL (.
|
JsonNominatimClient(String baseUrl,
org.apache.http.client.HttpClient httpClient,
String email)
Creates the json nominatim client.
|
JsonNominatimClient(String baseUrl,
org.apache.http.client.HttpClient httpClient,
String email,
NominatimOptions defaults)
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(NominatimReverseRequest reverse)
Reverse geocoding request.
|
Address |
getAddress(String type,
long id)
Reverse geocode the given OSM id.
|
List<Address> |
lookupAddress(List<String> typeId)
This method can be used to lookup addresses with an OSM type and ID
|
List<Address> |
lookupAddress(NominatimLookupRequest lookup)
Address lookup request.
|
List<Address> |
search(NominatimSearchRequest search)
Search for addresses.
|
List<Address> |
search(String query)
Search for results with the given query.
|
public static final String ENCODING_UTF_8
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(org.apache.http.client.HttpClient httpClient,
String email,
NominatimOptions defaults)
httpClient - an HTTP clientemail - an email to add in the HTTP requests parameters to "sign" themdefaults - defaults options, they override null valued requests optionspublic JsonNominatimClient(String baseUrl, org.apache.http.client.HttpClient httpClient, String email)
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)public JsonNominatimClient(String baseUrl, org.apache.http.client.HttpClient httpClient, String email, NominatimOptions defaults)
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)defaults - defaults options, they override null valued requests optionspublic List<Address> search(NominatimSearchRequest search) throws IOException
search in interface NominatimClientsearch - the search request parametersIOException - a communication error occurredNominatimClient.search(fr.dudie.nominatim.client.request.NominatimSearchRequest)public Address getAddress(NominatimReverseRequest reverse) throws IOException
getAddress in interface NominatimClientreverse - a reverse geocoding requestnull if no result foundIOException - a communication error occurredNominatimClient.getAddress(fr.dudie.nominatim.client.request.NominatimReverseRequest)public List<Address> lookupAddress(NominatimLookupRequest lookup) throws IOException
lookupAddress in interface NominatimClientlookup - a lookup requestnull if no result foundIOException - a communication error occurredNominatimClient.lookupAddress(fr.dudie.nominatim.client.request.NominatimLookupRequest)public List<Address> search(String query) throws IOException
See also NominatimClient.search(NominatimSearchRequest) to obtain more result details.
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 foundIOExceptionfr.dudie.nominatim.client.NominatimClient#getAddress(String, int)public List<Address> lookupAddress(List<String> typeId) throws IOException
lookupAddress in interface NominatimClienttypeId - [N|W|R]IDnull if no result foundIOException - a communication error occurredNominatimClient.lookupAddress(java.util.List)Copyright © 2010-2017 Dudie. All Rights Reserved.