xml/Microsoft.Azure.Documents.Spatial/GeometryOperationExtensions.xml (246 lines of code) (raw):
<Type Name="GeometryOperationExtensions" FullName="Microsoft.Azure.Documents.Spatial.GeometryOperationExtensions">
<TypeSignature Language="C#" Value="public static class GeometryOperationExtensions" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit GeometryOperationExtensions extends System.Object" />
<TypeSignature Language="DocId" Value="T:Microsoft.Azure.Documents.Spatial.GeometryOperationExtensions" />
<TypeSignature Language="VB.NET" Value="Public Module GeometryOperationExtensions" />
<TypeSignature Language="F#" Value="type GeometryOperationExtensions = class" />
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.14.0.0</AssemblyVersion>
<AssemblyVersion>2.14.1.0</AssemblyVersion>
<AssemblyVersion>2.15.0.0</AssemblyVersion>
<AssemblyVersion>2.16.0.0</AssemblyVersion>
<AssemblyVersion>2.16.1.0</AssemblyVersion>
<AssemblyVersion>2.16.2.0</AssemblyVersion>
<AssemblyVersion>2.17.0.0</AssemblyVersion>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.14.0.0</AssemblyVersion>
<AssemblyVersion>2.14.1.0</AssemblyVersion>
<AssemblyVersion>2.15.0.0</AssemblyVersion>
<AssemblyVersion>2.16.0.0</AssemblyVersion>
<AssemblyVersion>2.16.1.0</AssemblyVersion>
<AssemblyVersion>2.16.2.0</AssemblyVersion>
<AssemblyVersion>2.17.0.0</AssemblyVersion>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>
Operations supported on <see cref="T:Microsoft.Azure.Documents.Spatial.Geometry" /> type in the Azure Cosmos DB service. These operations are to be used in LINQ expressions only
and will be evaluated on server. There's no implementation provided in the client library.
</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName="Distance">
<MemberSignature Language="C#" Value="public static double Distance (this Microsoft.Azure.Documents.Spatial.Geometry from, Microsoft.Azure.Documents.Spatial.Geometry to);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig float64 Distance(class Microsoft.Azure.Documents.Spatial.Geometry from, class Microsoft.Azure.Documents.Spatial.Geometry to) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Spatial.GeometryOperationExtensions.Distance(Microsoft.Azure.Documents.Spatial.Geometry,Microsoft.Azure.Documents.Spatial.Geometry)" />
<MemberSignature Language="VB.NET" Value="<Extension()>
Public Function Distance (from As Geometry, to As Geometry) As Double" />
<MemberSignature Language="F#" Value="static member Distance : Microsoft.Azure.Documents.Spatial.Geometry * Microsoft.Azure.Documents.Spatial.Geometry -> double" Usage="Microsoft.Azure.Documents.Spatial.GeometryOperationExtensions.Distance (from, to)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Double</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="from" Type="Microsoft.Azure.Documents.Spatial.Geometry" RefType="this" />
<Parameter Name="to" Type="Microsoft.Azure.Documents.Spatial.Geometry" />
</Parameters>
<Docs>
<param name="from">First <see cref="T:Microsoft.Azure.Documents.Spatial.Geometry" />.</param>
<param name="to">Second <see cref="T:Microsoft.Azure.Documents.Spatial.Geometry" />.</param>
<summary>
Distance in meters between two geometries in the Azure Cosmos DB service.
</summary>
<returns>Returns distance in meters between two geometries.</returns>
<remarks>
Today this function support only geometries of <see cref="F:Microsoft.Azure.Documents.Spatial.GeometryType.Point" /> type.
</remarks>
<example>
<code><![CDATA[
var distanceQuery = documents.Where(document => document.Location.Distance(new Point(20.1, 20)) < 20000);
]]></code>
</example>
</Docs>
</Member>
<Member MemberName="Intersects">
<MemberSignature Language="C#" Value="public static bool Intersects (this Microsoft.Azure.Documents.Spatial.Geometry geometry1, Microsoft.Azure.Documents.Spatial.Geometry geometry2);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool Intersects(class Microsoft.Azure.Documents.Spatial.Geometry geometry1, class Microsoft.Azure.Documents.Spatial.Geometry geometry2) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Spatial.GeometryOperationExtensions.Intersects(Microsoft.Azure.Documents.Spatial.Geometry,Microsoft.Azure.Documents.Spatial.Geometry)" />
<MemberSignature Language="VB.NET" Value="<Extension()>
Public Function Intersects (geometry1 As Geometry, geometry2 As Geometry) As Boolean" />
<MemberSignature Language="F#" Value="static member Intersects : Microsoft.Azure.Documents.Spatial.Geometry * Microsoft.Azure.Documents.Spatial.Geometry -> bool" Usage="Microsoft.Azure.Documents.Spatial.GeometryOperationExtensions.Intersects (geometry1, geometry2)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="geometry1" Type="Microsoft.Azure.Documents.Spatial.Geometry" RefType="this" />
<Parameter Name="geometry2" Type="Microsoft.Azure.Documents.Spatial.Geometry" />
</Parameters>
<Docs>
<param name="geometry1">First <see cref="T:Microsoft.Azure.Documents.Spatial.Geometry" />.</param>
<param name="geometry2">Second <see cref="T:Microsoft.Azure.Documents.Spatial.Geometry" />.</param>
<summary>
Checks if geometry1 intersects with geometry2.
</summary>
<returns>Returns true if geometry1 intersects with geometry2, otherwise returns false.</returns>
<remarks>To be added.</remarks>
<example>
<code><![CDATA[
var distanceQuery = documents.Where(document => document.Location.Intersects(new Point(20.1, 20)));
]]></code>
</example>
</Docs>
</Member>
<Member MemberName="IsValid">
<MemberSignature Language="C#" Value="public static bool IsValid (this Microsoft.Azure.Documents.Spatial.Geometry geometry);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool IsValid(class Microsoft.Azure.Documents.Spatial.Geometry geometry) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Spatial.GeometryOperationExtensions.IsValid(Microsoft.Azure.Documents.Spatial.Geometry)" />
<MemberSignature Language="VB.NET" Value="<Extension()>
Public Function IsValid (geometry As Geometry) As Boolean" />
<MemberSignature Language="F#" Value="static member IsValid : Microsoft.Azure.Documents.Spatial.Geometry -> bool" Usage="Microsoft.Azure.Documents.Spatial.GeometryOperationExtensions.IsValid geometry" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="geometry" Type="Microsoft.Azure.Documents.Spatial.Geometry" RefType="this" />
</Parameters>
<Docs>
<param name="geometry">The geometry to check for validity.</param>
<summary>
<para>
Determines if the <paramref name="geometry" /> specified is valid and can be indexed
or used in queries by Azure Cosmos DB service.
</para>
<para>
If a geometry is not valid, it will not be indexed. Also during query time invalid geometries are equivalent to <c>undefined</c>.
</para>
</summary>
<returns>
<c>true</c> if geometry is valid. <c>false</c> otherwise.</returns>
<remarks>
Currently this function supports <paramref name="geometry" /> of type <see cref="F:Microsoft.Azure.Documents.Spatial.GeometryType.Point" /> and <see cref="F:Microsoft.Azure.Documents.Spatial.GeometryType.Polygon" />.
</remarks>
<example>
<para>
This example select all the documents which contain invalid geometries which were not indexed.
</para>
<code><![CDATA[
var invalidDocuments = documents.Where(document => !document.Location.IsValid());
]]></code>
</example>
</Docs>
</Member>
<Member MemberName="IsValidDetailed">
<MemberSignature Language="C#" Value="public static Microsoft.Azure.Documents.Spatial.GeometryValidationResult IsValidDetailed (this Microsoft.Azure.Documents.Spatial.Geometry geometry);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class Microsoft.Azure.Documents.Spatial.GeometryValidationResult IsValidDetailed(class Microsoft.Azure.Documents.Spatial.Geometry geometry) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Spatial.GeometryOperationExtensions.IsValidDetailed(Microsoft.Azure.Documents.Spatial.Geometry)" />
<MemberSignature Language="VB.NET" Value="<Extension()>
Public Function IsValidDetailed (geometry As Geometry) As GeometryValidationResult" />
<MemberSignature Language="F#" Value="static member IsValidDetailed : Microsoft.Azure.Documents.Spatial.Geometry -> Microsoft.Azure.Documents.Spatial.GeometryValidationResult" Usage="Microsoft.Azure.Documents.Spatial.GeometryOperationExtensions.IsValidDetailed geometry" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Documents.Spatial.GeometryValidationResult</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="geometry" Type="Microsoft.Azure.Documents.Spatial.Geometry" RefType="this" />
</Parameters>
<Docs>
<param name="geometry">The geometry to check for validity.</param>
<summary>
<para>
Determines if the <paramref name="geometry" /> specified is valid and can be indexed
or used in queries by Azure Cosmos DB service.
</para>
<para>
If a geometry is not valid, it will not be indexed. Also during query time invalid geometries are equivalent to <c>undefined</c>.
</para>
</summary>
<returns>Instance of <see cref="T:Microsoft.Azure.Documents.Spatial.GeometryValidationResult" />.</returns>
<remarks>
Currently this function supports <paramref name="geometry" /> of type <see cref="F:Microsoft.Azure.Documents.Spatial.GeometryType.Point" /> and <see cref="F:Microsoft.Azure.Documents.Spatial.GeometryType.Polygon" />.
</remarks>
<example>
<para>
This example select all the documents which contain invalid geometries which were not indexed.
</para>
<code><![CDATA[
var invalidReason = documents.Where(document => !document.Location.IsValid()).Select(document => document.Location.IsValidDetailed());
]]></code>
</example>
</Docs>
</Member>
<Member MemberName="Within">
<MemberSignature Language="C#" Value="public static bool Within (this Microsoft.Azure.Documents.Spatial.Geometry inner, Microsoft.Azure.Documents.Spatial.Geometry outer);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool Within(class Microsoft.Azure.Documents.Spatial.Geometry inner, class Microsoft.Azure.Documents.Spatial.Geometry outer) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Spatial.GeometryOperationExtensions.Within(Microsoft.Azure.Documents.Spatial.Geometry,Microsoft.Azure.Documents.Spatial.Geometry)" />
<MemberSignature Language="VB.NET" Value="<Extension()>
Public Function Within (inner As Geometry, outer As Geometry) As Boolean" />
<MemberSignature Language="F#" Value="static member Within : Microsoft.Azure.Documents.Spatial.Geometry * Microsoft.Azure.Documents.Spatial.Geometry -> bool" Usage="Microsoft.Azure.Documents.Spatial.GeometryOperationExtensions.Within (inner, outer)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="inner" Type="Microsoft.Azure.Documents.Spatial.Geometry" RefType="this" />
<Parameter Name="outer" Type="Microsoft.Azure.Documents.Spatial.Geometry" />
</Parameters>
<Docs>
<param name="inner">Inner <see cref="T:Microsoft.Azure.Documents.Spatial.Geometry" />.</param>
<param name="outer">Outer <see cref="T:Microsoft.Azure.Documents.Spatial.Geometry" />.</param>
<summary>
Determines if <paramref name="inner" /><see cref="T:Microsoft.Azure.Documents.Spatial.Geometry" /> is fully contained inside <paramref name="outer" /><see cref="T:Microsoft.Azure.Documents.Spatial.Geometry" /> in the Azure Cosmos DB service.
</summary>
<returns>
<c>true</c> if <paramref name="inner" /><see cref="T:Microsoft.Azure.Documents.Spatial.Geometry" /> is fully contained inside <paramref name="outer" /><see cref="T:Microsoft.Azure.Documents.Spatial.Geometry" />.
<c>false</c> otherwise.
</returns>
<remarks>
Currently this function supports <paramref name="inner" /> geometry of type <see cref="F:Microsoft.Azure.Documents.Spatial.GeometryType.Point" /> and outer geometry of type <see cref="F:Microsoft.Azure.Documents.Spatial.GeometryType.Polygon" />.
</remarks>
<example>
<code><![CDATA[
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));
]]></code>
</example>
</Docs>
</Member>
</Members>
</Type>