Share via


GeoBoundingBox Class

  • java.lang.Object
    • com.azure.core.models.GeoBoundingBox

Implements

public final class GeoBoundingBox
implements 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.

Constructor Summary

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 and Description
boolean equals(Object obj)
static GeoBoundingBox fromJson(JsonReader jsonReader)

Reads a JSON stream into a GeoBoundingBox.

double getEast()

The east longitudinal boundary of the bounding box.

Double getMaxAltitude()

The maximum altitude boundary of the bounding box.

Double getMinAltitude()

The minimum altitude boundary of the bounding box.

double getNorth()

The north latitudinal boundary of the bounding box.

double getSouth()

The south latitudinal boundary of the bounding box.

double getWest()

The west longitudinal boundary of the bounding box.

int hashCode()
JsonWriter toJson(JsonWriter jsonWriter)
String toString()

Methods inherited from java.lang.Object

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

equals

public boolean equals(Object obj)

Overrides:

GeoBoundingBox.equals(Object obj)

Parameters:

obj

fromJson

public static GeoBoundingBox fromJson(JsonReader jsonReader)

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:

IOException

- If the GeoBoundingBox doesn't have four or six positions in the array.

getEast

public double getEast()

The east longitudinal boundary of the bounding box.

Returns:

The east longitudinal boundary.

getMaxAltitude

public Double getMaxAltitude()

The maximum altitude boundary of the bounding box.

Returns:

The maximum altitude boundary.

getMinAltitude

public Double getMinAltitude()

The minimum altitude boundary of the bounding box.

Returns:

The minimum altitude boundary.

getNorth

public double getNorth()

The north latitudinal boundary of the bounding box.

Returns:

The north latitudinal boundary.

getSouth

public double getSouth()

The south latitudinal boundary of the bounding box.

Returns:

The south latitudinal boundary.

getWest

public double getWest()

The west longitudinal boundary of the bounding box.

Returns:

The west longitudinal boundary.

hashCode

public int hashCode()

Overrides:

GeoBoundingBox.hashCode()

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

toString

public String toString()

Overrides:

GeoBoundingBox.toString()

Applies to