Class | Description |
---|---|
Address |
a street address
|
BoundingBox | |
CountrySubdivision | |
Intersection |
an intersection between two streets
|
PostalCode |
a postal code
|
PostalCodeSearchCriteria |
search criteria for web services returning postal codes
|
StreetSegment |
a street line segment.
|
Timezone |
gmtOffset and dstOffset are computed on the server with the
TimeZone and included in the web service as not all
geonames users are using java. |
Toponym |
a GeoNames toponym
|
ToponymSearchCriteria |
search criteria for web services returning toponyms.
|
ToponymSearchResult |
a toponym search result as returned by the geonames webservice.
|
WeatherObservation | |
WebService |
provides static methods to access the
GeoNames web
services.
|
WikipediaArticle |
a wikipedia article
|
Enum | Description |
---|---|
FeatureClass |
Enumeration for the GeoNames feature classes A,H,L,P,R,S,T,U,V
|
Style |
Enumeration for style parameter specifying the verbosity of geonames web
services
|
Exception | Description |
---|---|
GeoNamesException | |
InsufficientStyleException |
Is thrown when trying to access a field that has not been set as the style
for the request was not sufficiently verbose to return this information.
|
InvalidParameterException |
is thrown when the search criteria is initialized with obviously invalid parameters,
such as an invalid country code.
|
ToponymSearchCriteria searchCriteria = new ToponymSearchCriteria(); searchCriteria.setQ("zurich"); ToponymSearchResult searchResult = WebService.search(searchCriteria); for (Toponym toponym : searchResult.toponyms) { System.out.println(toponym.getName()+" "+ toponym.getCountryName()); }
PostalCodeSearchCriteria postalCodeSearchCriteria = new PostalCodeSearchCriteria(); postalCodeSearchCriteria.setLatitude(37.373636); postalCodeSearchCriteria.setLongitude(-121.972146); ListpostalCodes = WebService.findNearbyPostalCodes(postalCodeSearchCriteria);