public interface GeoCoder
| Modifier and Type | Method and Description |
|---|---|
Optional<String> |
getCountryCode(String locationWKT,
int radius)
Retrieves the country code for a given location.
|
GeoResult |
getLocation(String location)
Takes a query for a place and returns the most relevant result.
|
NearbyLocation |
getNearbyCity(String locationWKT) |
GeoResult getLocation(String location)
location - a string representing a simple placename query, such as "Washington, D.C." or
"France" (i.e. the string just contains search terms, not query logic)GeoResult most relevant to the query, null if no results were foundNearbyLocation getNearbyCity(String locationWKT) throws GeoEntryQueryException
locationWKT - - a WKT string describing the area to searchGeoEntryQueryException - if an exception occurs while querying the GeoNames resourceOptional<String> getCountryCode(String locationWKT, int radius)
locationWKT is a polygon.locationWKT - WKT location for which to get the country code ofradius - Radius in kilometers to search from the center of locationWKTThis work is licensed under a Creative Commons Attribution 4.0 International License.