你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Geometry 类

定义

Azure Cosmos DB 服务中空间几何对象的基类。

[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
继承
Geometry
派生
属性
Newtonsoft.Json.JsonConverterAttribute Newtonsoft.Json.JsonObjectAttribute DataContractAttribute

构造函数

Geometry(GeometryType, GeometryParams)

初始化 Azure Cosmos DB 服务中 类的新实例 Geometry

属性

AdditionalProperties

获取 Azure Cosmos DB 服务中的其他属性。

BoundingBox

获取 Azure Cosmos DB 服务中此几何图形的边界框。

Crs

获取 Azure Cosmos DB 服务中此几何图形的坐标参考系统。

Type

获取 Azure Cosmos DB 服务中的 geometry 类型。

方法

Distance(Geometry)

Azure Cosmos DB 服务中两个几何图形之间的距离(以米为单位)。

Equals(Object)

确定指定的 Geometry 是否等于 Azure Cosmos DB 服务中的当前 Geometry

GetHashCode()

用作 Azure Cosmos DB 服务中类型的哈希函数 Geometry

Intersects(Geometry)

检查当前 geometry1 是否与 geometry2 相交。

IsValid()

确定指定的几何图形是否有效,并且可由 Azure Cosmos DB 服务在查询中编制索引或使用。

如果几何图形无效,则不会对其进行索引。 此外,在查询期间,无效的几何图形等效于 undefined

IsValidDetailed()

确定指定的几何图形是否有效,并且可以由 Azure Cosmos DB 服务在查询中编制索引或使用,如果无效,则以字符串值的形式提供其他原因。

如果几何图形无效,则不会对其进行索引。 此外,在查询期间,无效的几何图形等效于 undefined

Within(Geometry)

确定当前内部 Geometry 是否完全包含在 Azure Cosmos DB 服务中 outerGeometry

适用于