STDistance Method
TOC
Collapse the table of content
Expand the table of content

SqlGeometry.STDistance Method (SqlGeometry)

 

Returns the shortest distance between a point in a SqlGeometry instance and a point in the specified SqlGeometry instance.

Namespace:   Microsoft.SqlServer.Types
Assembly:  Microsoft.SqlServer.Types (in Microsoft.SqlServer.Types.dll)

[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
public SqlDouble STDistance(
	SqlGeometry other
)

Parameters

other
Type: Microsoft.SqlServer.Types.SqlGeometry

The SqlGeometry instance from which to measure the distance between the instance on which STDistance is invoked. If other is an empty set, STDistance returns null.

Return Value

Type: System.Data.SqlTypes.SqlDouble

A SqlDouble value that represents the shortest distance between a point in the calling SqlGeometry and a point in the specified SqlGeometry.

STDistance always returns null if the spatial reference IDs (SRIDs) of the SqlGeometry instances do not match.

Return to top
Show:
© 2016 Microsoft