Class GeoObject

    • Field Summary

      Fields 
      Modifier and Type Field Description
      BoundingBox boundingBox
      Optional bounding box associated with this GeoJSON type.
      static java.math.BigDecimal MAX_LATITUDE
      Maximum allowed latitude is +90.
      static java.math.BigDecimal MAX_LONGITUDE
      Maximum allowed longitude is +180.
      static java.math.BigDecimal MIN_LATITUDE
      Minimum allowed latitude is -90.
      static java.math.BigDecimal MIN_LONGITUDE
      Minimum allowed longitude is -180.
      GeoObject.GeoType type
      Data represents this geometry type.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected GeoObject​(GeoObject.GeoBuilder<?> builder)
      Creates a new OpenStreatMap element based on the given builder settings.
    • Field Detail

      • MIN_LATITUDE

        public static final java.math.BigDecimal MIN_LATITUDE
        Minimum allowed latitude is -90.
      • MAX_LATITUDE

        public static final java.math.BigDecimal MAX_LATITUDE
        Maximum allowed latitude is +90.
      • MIN_LONGITUDE

        public static final java.math.BigDecimal MIN_LONGITUDE
        Minimum allowed longitude is -180.
      • MAX_LONGITUDE

        public static final java.math.BigDecimal MAX_LONGITUDE
        Maximum allowed longitude is +180.
      • boundingBox

        @Nullable
        public final BoundingBox boundingBox
        Optional bounding box associated with this GeoJSON type.
    • Constructor Detail

      • GeoObject

        protected GeoObject​(GeoObject.GeoBuilder<?> builder)
        Creates a new OpenStreatMap element based on the given builder settings.
        Parameters:
        builder - contains common element settings.
    • Method Detail

      • toString

        public java.lang.String toString()
        Returns text specifying GeoJSON type.
        Overrides:
        toString in class java.lang.Object
        Returns:
        human-readable text containing GeoJSON type name.
      • validateLatitude

        public static java.math.BigDecimal validateLatitude​(java.math.BigDecimal latitude)
        Certifies that latitude is not null and is ≥ MIN_LATITUDE and ≤ MAX_LATITUDE. Throws the appropriate exception if not the case. Otherwise returns the validated latitude.
        Parameters:
        latitude - validate this latitude.
        Returns:
        validated latitude.
        Throws:
        java.lang.NullPointerException - if latitude is null.
        java.lang.IllegalArgumentException - if latitude < MIN_LATITUDE or > MAX_LATITUDE.
      • validateLongitude

        public static java.math.BigDecimal validateLongitude​(java.math.BigDecimal longitude)
        Certifies that longitude is not null and is ≥ MIN_LONGITUDE and ≤ MAX_LONGITUDE. Throws the appropriate exception if not the case. Otherwise returns the validated longitude.
        Parameters:
        longitude - validate this longitude.
        Returns:
        validated longitude.
        Throws:
        java.lang.NullPointerException - if longitude is null.
        java.lang.IllegalArgumentException - if longitude < MIN_LONGITUDE or > MAX_LONGITUDE.