GeocoderBuilder
A Geocoder is the primary implementation of
the GeocodingAPI. This object exposes the primary services available for geocoding.
/**
* dist/resources
* - config
* - bin
* - lib
**\/
GeocodingConfiguration configuration = new ConfigurationBuilder()
.withConfigurationPath(Paths.get("dist/resources"))
.build();
GeocodingAPI geocoder = new Geocoder(configuration);
Address address = new GeocodeAddress();
address.setMainAddressLine("1 Global View Troy NY 12180 USA");
Response response = geocoder.geocode(GeocoderType.ADDRESS, address, null);
@Deprecated public class Geocoder extends Object implements GeocodingAPI
Constructor and Description |
---|
Geocoder()
Deprecated.
Constructs a Geocoder object
|
Geocoder(com.pb.geocoding.config.api.GeocodingConfiguration configuration)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
|
Response |
geocode(GeocodeType type,
Address address,
Preferences preferences)
Deprecated.
Geocode an address.
|
List<Response> |
geocodeMultiple(GeocodeType type,
List<Address> addressList,
Preferences preferences)
Deprecated.
|
CapabilitiesResponse |
getCapabilities()
Deprecated.
Get the capabilities of the geocoding service for all countries.
|
CapabilitiesResponse |
getCapabilities(String country)
Deprecated.
Get the capabilities of all geocoding service operations for a single country.
|
CapabilitiesResponse |
getCapabilities(String country,
String operation)
Deprecated.
Get the capabilities of the named operation for a single country.
|
List<Dictionary> |
getConfiguredDictionaries()
Deprecated.
Get the configured dictionaries for all countries.
|
List<Dictionary> |
getConfiguredDictionaries(String country)
Deprecated.
Get the configured dictionaries for a single country.
|
Response |
keyLookup(KeyType type,
Key key,
Preferences preferences)
Deprecated.
|
List<Response> |
keyLookupMultiple(KeyType type,
List<Key> keys,
Preferences preferences)
Deprecated.
|
Response |
reverseGeocode(double x,
double y,
String csys,
String country,
Preferences preferences)
Deprecated.
Reverse geocode a point and return the address closest to the given x and y value.
|
Response |
reverseGeocode(com.mapinfo.midev.geometry.IPoint point,
String country,
Preferences preferences)
Deprecated.
Reverse geocode a point and return the address closest to that point.
|
List<Response> |
reverseGeocodeMultiple(List<Points> locationList,
Preferences preferences)
Deprecated.
|
public Geocoder() throws GeocodingException
GeocodingException
- if an exception is thrown during construction of a Geocoder objectpublic Geocoder(com.pb.geocoding.config.api.GeocodingConfiguration configuration) throws GeocodingException
GeocodingException
public Response geocode(GeocodeType type, Address address, Preferences preferences) throws GeocodingException
GeocodingAPI
geocode
in interface GeocodingAPI
type
- - type of geocoding operation to performaddress
- - the address to geocodepreferences
- - geocoding preferencesGeocodingException
- if exception is thrown while performing operationpublic List<Response> geocodeMultiple(GeocodeType type, List<Address> addressList, Preferences preferences) throws GeocodingException
geocodeMultiple
in interface GeocodingAPI
type
- - type of geocoding operation to perform on each address in the listaddressList
- - the list of addresses to geocodepreferences
- - geocoding preferences to apply to each address in the listGeocodingException
- if exception is thrown while performing operationpublic Response reverseGeocode(double x, double y, String csys, String country, Preferences preferences) throws GeocodingException
GeocodingAPI
reverseGeocode
in interface GeocodingAPI
x
- - the x value of the locationy
- - the y value of the locationcsys
- - the name of the coordinate system in "codespace:code" format.country
- - the optional country specificationpreferences
- - geocoding preferencesGeocodingException
- if exception is thrown while performing operationpublic Response reverseGeocode(com.mapinfo.midev.geometry.IPoint point, String country, Preferences preferences) throws GeocodingException
GeocodingAPI
reverseGeocode
in interface GeocodingAPI
point
- - Contains the location to look up.country
- - the optional country specificationpreferences
- - geocoding preferencesGeocodingException
- if exception is thrown while performing operationpublic List<Response> reverseGeocodeMultiple(List<Points> locationList, Preferences preferences) throws GeocodingException
reverseGeocodeMultiple
in interface GeocodingAPI
locationList
- - the list of locationspreferences
- - geocoding preferencesGeocodingException
- if exception is thrown while performing operationpublic List<Dictionary> getConfiguredDictionaries(String country) throws GeocodingException
GeocodingAPI
getConfiguredDictionaries
in interface GeocodingAPI
country
- - the country to return the information for.GeocodingException
- if exception is thrown while performing operationpublic List<Dictionary> getConfiguredDictionaries() throws GeocodingException
GeocodingAPI
getConfiguredDictionaries
in interface GeocodingAPI
GeocodingException
- if exception is thrown while performing operationpublic CapabilitiesResponse getCapabilities() throws GeocodingException
GeocodingAPI
getCapabilities
in interface GeocodingAPI
GeocodingException
- if exception is thrown while performing operationpublic CapabilitiesResponse getCapabilities(String country, String operation) throws GeocodingException
GeocodingAPI
getCapabilities
in interface GeocodingAPI
country
- - the country to return the information for. i.e. USAoperation
- - operation to return the information for. i.e. geocodeGeocodingException
- if exception is thrown while performing operationpublic CapabilitiesResponse getCapabilities(String country) throws GeocodingException
GeocodingAPI
getCapabilities
in interface GeocodingAPI
country
- - the country to return the information for.GeocodingException
- if exception is thrown while performing operationpublic Response keyLookup(KeyType type, Key key, Preferences preferences) throws GeocodingException
keyLookup
in interface GeocodingAPI
type
- - type of the key to do geocoding based off ofkey
- - look up key to use for geocodingpreferences
- - preferences that should be used for geocoding or for returning responseGeocodingException
- if exception is thrown while performing operationpublic List<Response> keyLookupMultiple(KeyType type, List<Key> keys, Preferences preferences) throws GeocodingException
keyLookupMultiple
in interface GeocodingAPI
type
- - type of the key to do geocoding based off ofkeys
- - keys to be used for geocodingpreferences
- - preferences that should be used for geocoding or for returning responseGeocodingException
- if exception is thrown while performing operationpublic void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2024. All rights reserved.