Share via


Geometry Class

Definition

Base class for spatial geometry objects in the Azure Cosmos DB service.

[Newtonsoft.Json.JsonConverter(typeof(Microsoft.Azure.Cosmos.Spatial.Converters.GeometryJsonConverter))]
[Newtonsoft.Json.JsonObject(Newtonsoft.Json.MemberSerialization.OptIn)]
[System.Runtime.Serialization.DataContract]
public abstract class Geometry
[<Newtonsoft.Json.JsonConverter(typeof(Microsoft.Azure.Cosmos.Spatial.Converters.GeometryJsonConverter))>]
[<Newtonsoft.Json.JsonObject(Newtonsoft.Json.MemberSerialization.OptIn)>]
[<System.Runtime.Serialization.DataContract>]
type Geometry = class
Public MustInherit Class Geometry
Inheritance
Geometry
Derived
Attributes
Newtonsoft.Json.JsonConverterAttribute Newtonsoft.Json.JsonObjectAttribute DataContractAttribute

Constructors

Geometry(GeometryType, GeometryParams)

Initializes a new instance of the Geometry class in the Azure Cosmos DB service.

Properties

AdditionalProperties

Gets additional properties in the Azure Cosmos DB service.

BoundingBox

Gets bounding box for this geometry in the Azure Cosmos DB service.

Crs

Gets the Coordinate Reference System for this geometry in the Azure Cosmos DB service.

Type

Gets geometry type in the Azure Cosmos DB service.

Methods

Distance(Geometry)

Distance in meters between two geometries in the Azure Cosmos DB service.

Equals(Object)

Determines whether the specified Geometry is equal to the current Geometry in the Azure Cosmos DB service.

GetHashCode()

Serves as a hash function for the Geometry type in the Azure Cosmos DB service.

Intersects(Geometry)

Checks if current geometry1 intersects with geometry2.

IsValid()

Determines if the geometry specified is valid and can be indexed or used in queries by Azure Cosmos DB service.

If a geometry is not valid, it will not be indexed. Also during query time invalid geometries are equivalent to undefined.

IsValidDetailed()

Determines if the geometry specified is valid and can be indexed or used in queries by Azure Cosmos DB service and if invalid, gives the additional reason as a string value.

If a geometry is not valid, it will not be indexed. Also during query time invalid geometries are equivalent to undefined.

Within(Geometry)

Determines if current inner Geometry is fully contained inside outerGeometry in the Azure Cosmos DB service.

Applies to