SqlGeography.STGeomCollFromText Method (SqlChars, Int32)
Applies To: SQL Server 2016 Preview
Returns a geography instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation, augmented with any Z (elevation) and M (measure) values carried by the instance.
Namespace: Microsoft.SqlServer.Types
Assembly: Microsoft.SqlServer.Types (in Microsoft.SqlServer.Types.dll)
Syntax
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
public static SqlGeography STGeomCollFromText(
SqlChars geometryCollectionTaggedText,
int srid
)
public:
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
static SqlGeography^ STGeomCollFromText(
SqlChars^ geometryCollectionTaggedText,
int srid
)
[<SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)>]
static member STGeomCollFromText :
geometryCollectionTaggedText:SqlChars *
srid:int -> SqlGeography
<SqlMethodAttribute(IsDeterministic := True, IsPrecise := False)>
Public Shared Function STGeomCollFromText (
geometryCollectionTaggedText As SqlChars,
srid As Integer
) As SqlGeography
Parameters
geometryCollectionTaggedText
Type: System.Data.SqlTypes.SqlCharsIs the WKT representation of the geography instance you wish to return. geometrycollection_tagged_text is an nvarchar(max) expression.
srid
Type: System.Int32Is an int expression representing the spatial reference ID (SRID) of the geography instance you wish to return.
Return Value
Type: Microsoft.SqlServer.Types.SqlGeography
A geography instance.
Remarks
The OGC type of the geography instance returned by STGeomCollFromText is set to the corresponding WKT input.
This method throws an ArgumentException if the input is not valid.
See Also
SqlGeography Class
Microsoft.SqlServer.Types Namespace
Return to top