GeoObject Class
- java.
lang. Object - com.
azure. core. models. GeoObject
- com.
Implements
public abstract class GeoObject
implements JsonSerializable<GeoObject>
Represents an abstract geometric object in GeoJSON format.
This class encapsulates the common properties of a geometric object, including the bounding box and additional custom properties. It provides methods to access these properties.
This class also provides a toJson(JsonWriter jsonWriter) method to serialize the geometric object to JSON, and a fromJson(JsonReader jsonReader) method to deserialize a geometric object from JSON.
Constructor Summary
| Modifier | Constructor | Description |
|---|---|---|
| protected | GeoObject(GeoBoundingBox boundingBox, Map<String,Object> customProperties) |
Creates a GeoObject instance. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| boolean | equals(Object obj) |
|
static
Geo |
fromJson(JsonReader jsonReader)
Reads an instance of GeoObject from the Json |
|
final
Geo |
getBoundingBox()
Bounding box for this GeoObject. |
| final Map<String,Object> |
getCustomProperties()
Additional properties about this GeoObject. |
|
abstract
Geo |
getType()
Gets the GeoJSON type for this object. |
| int | hashCode() |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
GeoObject
Method Details
equals
public boolean equals(Object obj)
Overrides:
GeoObject.equals(Object obj)Parameters:
fromJson
public static GeoObject fromJson(JsonReader jsonReader)
Reads an instance of GeoObject from the JsonReader.
Parameters:
Returns:
Throws:
getBoundingBox
getCustomProperties
getType
public abstract GeoObjectType getType()
Gets the GeoJSON type for this object.
Returns:
hashCode
public int hashCode()
Overrides:
GeoObject.hashCode()