Class ReverseGeocodingService

java.lang.Object
com.massifmaps.geocoding.ReverseGeocodingService
Direct Known Subclasses:
MapBoxOnlineReverseGeocodingService, MultiOSMOfflineReverseGeocodingService, OSMOfflineReverseGeocodingService, PackageManagerReverseGeocodingService, PeliasOnlineReverseGeocodingService, TomTomOnlineReverseGeocodingService

public class ReverseGeocodingService extends Object
An abstract base class for reverse geocoding services.
  • Constructor Details

    • ReverseGeocodingService

      protected ReverseGeocodingService()
      The default constructor.
  • Method Details

    • getLanguage

      public String getLanguage()
      Returns the language of the expected results.
      Returns:
      The language of the expected results. As ISO 639-1 code or empty string.
    • setLanguage

      public void setLanguage(String lang)
      Sets the language of the expected results.
      Parameters:
      lang - The language to use as ISO 639-1 code. Empty string can be used for default language.
    • calculateAddresses

      public GeocodingResultVector calculateAddresses(ReverseGeocodingRequest request) throws IOException
      Calculates matching addresses from the specified reverse geocoding request.
      Parameters:
      request - The reverse geocoding request to use.
      Returns:
      The list of matching geocoding results, sorted by descending ranks.
      Throws:
      Exception - If IO error occured during the calculation.
      IOException