Polygon Class

 

Updated: June 30, 2017

Polygon geometry class in the Azure DocumentDB database service.

A polygon is represented by the set of "polygon rings". Each ring is closed line string. First ring defines external ring. All subsequent rings define "holes" in the external ring.

Rings must be specified using Left Hand Rule: traversing the ring in the order of its points, should result in internal area of the polygon being to the left side.

Namespace:   Microsoft.Azure.Documents.Spatial
Assembly:  Microsoft.Azure.Documents.Client (in Microsoft.Azure.Documents.Client.dll)

SystemObject
  Microsoft.Azure.Documents.SpatialGeometry
    Microsoft.Azure.Documents.SpatialPolygon

No code example is currently available or this language may not be supported.

NameDescription
System_CAPS_pubmethodPolygon

Initializes a new instance of the Polygon class in the Azure DocumentDB database service.

System_CAPS_pubmethodPolygon

Initializes a new instance of the Polygon class in the Azure DocumentDB database service.

System_CAPS_pubmethodPolygon

Initializes a new instance of the Polygon class, from external ring (the polygon contains no holes) in the Azure DocumentDB database service.

NameDescription
System_CAPS_pubproperty

Gets additional properties in the Azure DocumentDB database service. (Inherited from Geometry.)

System_CAPS_pubproperty

Gets bounding box for this geometry in the Azure DocumentDB database service. (Inherited from Geometry.)

System_CAPS_pubproperty

Gets the Coordinate Reference System for this geometry in the Azure DocumentDB database service. (Inherited from Geometry.)

System_CAPS_pubproperty

Gets the polygon rings in the Azure DocumentDB database service.

System_CAPS_pubproperty

Gets geometry type in the Azure DocumentDB database service. (Inherited from Geometry.)

NameDescription
System_CAPS_pubmethodEquals

Determines whether the specified Polygon is equal to the current Polygon in the Azure DocumentDB database service. (Overrides GeometryEquals.)

System_CAPS_pubmethodEquals

Determines if this Polygon is equal to the other in the Azure DocumentDB database service.

System_CAPS_pubmethodGetHashCode

Serves as a hash function for the Polygon type in the Azure DocumentDB database service. (Overrides GeometryGetHashCode.)

System_CAPS_pubmethodGetType

(Inherited from Object.)

System_CAPS_pubmethodToString

(Inherited from Object.)

NameDescription
System_CAPS_pubmethodDistance

Distance in meters between two geometries in the Azure DocumentDB database service. (Defined by GeometryOperationExtensions.)

System_CAPS_pubmethodIntersects

Checks if geometry1 intersects with geometry2. (Defined by GeometryOperationExtensions.)

System_CAPS_pubmethodIsDefined

Determines if a certain property is defined or not. (Defined by TypeCheckFunctionsExtensions.)

System_CAPS_pubmethodIsNull

Determines if a certain property is null or not. (Defined by TypeCheckFunctionsExtensions.)

System_CAPS_pubmethodIsPrimitive

Determines if a certain property is of premitive JSON type. (Defined by TypeCheckFunctionsExtensions.)

System_CAPS_pubmethodIsValid

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

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

System_CAPS_pubmethodIsValidDetailed

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

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

System_CAPS_pubmethodWithin

Determines if innerGeometry is fully contained inside outerGeometry in the Azure DocumentDB database service. (Defined by GeometryOperationExtensions.)

This example shows how to define a polygon which covers small portion of the Earth:


var polygon = new Polygon(
        new[]
        {
            new Position(20.0, 20.0),
            new Position(30.0, 20.0),
            new Position(30.0, 30.0),
            new Position(20.0, 30.0)
            new Position(20.0, 20.0)
        });

This example shows how to define a polygon which covers area more than one hemisphere: (Notice that only order of coordinates was reversed).


var polygon = new Polygon(
        new[]
        {
            new Position(20.0, 20.0),
            new Position(20.0, 30.0),
            new Position(30.0, 30.0),
            new Position(30.0, 20.0)
            new Position(20.0, 20.0)
        });

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: