Enum GeocodingLevel

java.lang.Object
java.lang.Enum<GeocodingLevel>
com.cercalia.sdk.model.geocoding.GeocodingLevel
All Implemented Interfaces:
Serializable, Comparable<GeocodingLevel>, java.lang.constant.Constable

public enum GeocodingLevel extends Enum<GeocodingLevel>
Geocoding level indicating precision and administrative hierarchy of result.

Maps directly to Cercalia API values and indicates the granularity of the geocoding result. Higher precision levels (ADR, ST) have more specific location information than lower levels (CTRY, REG).

Precision levels from highest to lowest:

  1. ADR - Full address with house number
  2. ST - Street level
  3. CT - City/locality level
  4. PCODE - Postal code area
  5. MUN - Municipality level
  6. SUBREG - Subregion/province level
  7. REG - Region/state level
  8. CTRY - Country level
See Also:
  • Enum Constant Details

    • ADR

      public static final GeocodingLevel ADR
      Highest precision: full address with house number
    • ST

      public static final GeocodingLevel ST
      Street level: road without specific address
    • CT

      public static final GeocodingLevel CT
      City (locality) level
    • PCODE

      public static final GeocodingLevel PCODE
      Postal code level
    • MUN

      public static final GeocodingLevel MUN
      Municipality level
    • SUBREG

      public static final GeocodingLevel SUBREG
      Subregion (subregion) level
    • REG

      public static final GeocodingLevel REG
      Region (state/autonomous community) level
    • CTRY

      public static final GeocodingLevel CTRY
      Lowest precision: country level
    • RD

      public static final GeocodingLevel RD
      Road level
    • PK

      public static final GeocodingLevel PK
      Milestone (kilometer mark) level
    • POI

      public static final GeocodingLevel POI
      POI (Point of Interest) level
  • Method Details

    • values

      public static GeocodingLevel[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static GeocodingLevel valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Returns the Cercalia API value for this level.
      Returns:
      API value
    • fromValue

      public static GeocodingLevel fromValue(String value)
      Parses a Cercalia level string to GeocodingLevel.

      Case-insensitive comparison with Cercalia API values.

      Parameters:
      value - Cercalia level string
      Returns:
      corresponding GeocodingLevel, or null if not recognized