Class ReverseGeocodeResult

java.lang.Object
com.cercalia.sdk.model.reversegeocoding.ReverseGeocodeResult

public final class ReverseGeocodeResult extends Object
Extended reverse geocoding result with all possible data.

A reverse geocoding result maps a geographic coordinate to its nearest administrative or geographic feature, such as an address, a road milestone, or a timezone.

Example usage:


 ReverseGeocodeResult result = response.getResults().get(0);
 System.out.println("Address: " + result.getGe().getLabel());
 if (result.getDistance() != null) {
     System.out.println("Distance to feature: " + result.getDistance() + "m");
 }
 
  • Method Details

    • builder

      public static ReverseGeocodeResult.Builder builder()
    • getGe

      @NotNull public @NotNull GeocodingCandidate getGe()
      Returns:
      The geographic information.
    • getDistance

      @Nullable public @Nullable Double getDistance()
      Returns:
      The distance from input coordinate to the feature in meters.
    • getKm

      @Nullable public @Nullable String getKm()
      Returns:
      The milestone (KM) if available (for roads).
    • getDirection

      @Nullable public @Nullable String getDirection()
      Returns:
      The road direction (A=ascending/D=descending).
    • getMaxSpeed

      @Nullable public @Nullable Double getMaxSpeed()
      Returns:
      The maximum speed limit on the road in km/h.
    • getTimezone

      @Nullable public @Nullable TimezoneInfo getTimezone()
      Returns:
      The timezone information.
    • getCensusId

      @Nullable public @Nullable String getCensusId()
      Returns:
      The census section ID (Spain only).
    • getSigpac

      @Nullable public @Nullable SigpacInfo getSigpac()
      Returns:
      The SIGPAC info (Spain only).
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object