GeometryOperationExtensionsIsValidDetailed Method

 

Updated: June 30, 2017

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.

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

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

Parameters

geometry
Type:

The geometry to check for validity.

Return Value

Type:

Instance of GeometryValidationResult.

Currently this function supports geometry of type Point and Polygon.

This example select all the documents which contain invalid geometries which were not indexed.


var invalidReason = documents.Where(document => !document.Location.IsValid()).Select(document => document.Location.IsValidDetailed());

Return to top
Show: