Partilhar via


Geometry.Within(Geometry) Método

Definição

Determina se a parte interna Geometry atual está totalmente contida outerGeometry no serviço do Azure Cosmos DB.

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

Parâmetros

outer
Geometry

Externo Geometry.

Retornos

true se o interno Geometry atual estiver totalmente contido dentro outerGeometryde . false caso contrário.

Exemplos

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));

Comentários

Atualmente, essa função dá suporte à geometria atual do tipo Point e geometria externa do tipo Polygon.

Aplica-se a