SqlGeometry.Parse Method (SqlString)


Returns a SqlGeometry instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation.

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

[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
public static SqlGeometry Parse(
	SqlString s


Type: System.Data.SqlTypes.SqlString

Specifies the the WKT representation of the SqlGeometry instance you wish to return.

Return Value

Type: Microsoft.SqlServer.Types.SqlGeometry

A SqlGeometry instance interpreted from the provided WKT representation.

Returns null if s is null.

Parse is equivalent to STGeomFromText, with the exception that it assumes a spatial reference ID (SRID) of 0 as a parameter.

The input may carry optional Z (elevation) and M (measure) values.

This member is static.

Return to top