次の方法で共有


Geometry.Within(Geometry) メソッド

定義

現在の内部 Geometry が Azure Cosmos DB サービス内 outerGeometry に完全に含まれているかどうかを判断します。

public bool Within (Microsoft.Azure.Cosmos.Spatial.Geometry outer);
member this.Within : Microsoft.Azure.Cosmos.Spatial.Geometry -> bool
Public Function Within (outer As Geometry) As Boolean

パラメーター

outer
Geometry

外部 Geometry

戻り値

true 現在の内部 Geometry が 内に完全に含まれている outerGeometry場合は 。 それ以外の場合は false

Polygon polygon = new Polygon(
       new[]
       {
            new Position(10, 10),
            new Position(30, 10),
            new Position(30, 30),
            new Position(10, 30),
            new Position(10, 10)
       });
var withinQuery = documents.Where(document => document.Location.Within(polygon));

注釈

現在、この関数は 型の現在のジオメトリと 型 Point の外部ジオメトリをサポートしています Polygon

適用対象