Class GeoBoundingBox

java.lang.Object
com.azure.core.models.GeoBoundingBox
All Implemented Interfaces:
com.azure.json.JsonSerializable<GeoBoundingBox>

public final class GeoBoundingBox extends Object implements com.azure.json.JsonSerializable<GeoBoundingBox>
Represents a geometric bounding box.

This class encapsulates a bounding box defined by west, south, east, and north coordinates, and optionally minimum and maximum altitude. It provides methods to access these properties.

This class is useful when you want to work with a bounding box in a geographic context. For example, you can use it to define the area of interest for a map view, or to specify the spatial extent of a geographic dataset.

See Also:
  • JsonSerializable
  • Constructor Summary

    Constructors
    Constructor
    Description
    GeoBoundingBox(double west, double south, double east, double north)
    Constructs a bounding box.
    GeoBoundingBox(double west, double south, double east, double north, double minAltitude, double maxAltitude)
    Constructs a bounding box.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads a JSON stream into a GeoBoundingBox.
    double
    The east longitudinal boundary of the bounding box.
    The maximum altitude boundary of the bounding box.
    The minimum altitude boundary of the bounding box.
    double
    The north latitudinal boundary of the bounding box.
    double
    The south latitudinal boundary of the bounding box.
    double
    The west longitudinal boundary of the bounding box.
    int
     
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • GeoBoundingBox

      public GeoBoundingBox(double west, double south, double east, double north)
      Constructs a bounding box.
      Parameters:
      west - West longitudinal boundary.
      south - South latitudinal boundary.
      east - East longitudinal boundary.
      north - North latitudinal boundary.
    • GeoBoundingBox

      public GeoBoundingBox(double west, double south, double east, double north, double minAltitude, double maxAltitude)
      Constructs a bounding box.
      Parameters:
      west - West longitudinal boundary.
      south - South latitudinal boundary.
      east - East longitudinal boundary.
      north - North latitudinal boundary.
      minAltitude - Minimum altitude boundary.
      maxAltitude - Maximum altitude boundary.
  • Method Details

    • getWest

      public double getWest()
      The west longitudinal boundary of the bounding box.
      Returns:
      The west longitudinal boundary.
    • getSouth

      public double getSouth()
      The south latitudinal boundary of the bounding box.
      Returns:
      The south latitudinal boundary.
    • getEast

      public double getEast()
      The east longitudinal boundary of the bounding box.
      Returns:
      The east longitudinal boundary.
    • getNorth

      public double getNorth()
      The north latitudinal boundary of the bounding box.
      Returns:
      The north latitudinal boundary.
    • getMinAltitude

      public Double getMinAltitude()
      The minimum altitude boundary of the bounding box.
      Returns:
      The minimum altitude boundary.
    • getMaxAltitude

      public Double getMaxAltitude()
      The maximum altitude boundary of the bounding box.
      Returns:
      The maximum altitude boundary.
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<GeoBoundingBox>
      Throws:
      IOException
    • fromJson

      public static GeoBoundingBox fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads a JSON stream into a GeoBoundingBox.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      The GeoBoundingBox that the JSON stream represented, or null if it pointed to JSON null.
      Throws:
      IllegalStateException - If the GeoBoundingBox doesn't have four or six positions in the array.
      IOException - If a GeoBoundingBox fails to be read from the jsonReader.