インスタンスに格納されている Z (標高) 値および M (メジャー) 値で補完された、Open Geospatial Consortium (OGC) の Well-Known Text (WKT) 表現を基に SqlGeography インスタンスを返します。
名前空間: Microsoft.SqlServer.Types
アセンブリ: Microsoft.SqlServer.Types (Microsoft.SqlServer.Types.dll)
構文
'宣言
<SqlMethodAttribute(IsDeterministic := True, IsPrecise := False)> _
Public Shared Function STGeomFromText ( _
geometryTaggedText As SqlChars, _
srid As Integer _
) As SqlGeography
'使用
Dim geometryTaggedText As SqlChars
Dim srid As Integer
Dim returnValue As SqlGeography
returnValue = SqlGeography.STGeomFromText(geometryTaggedText, _
srid)
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
public static SqlGeography STGeomFromText(
SqlChars geometryTaggedText,
int srid
)
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
public:
static SqlGeography^ STGeomFromText(
SqlChars^ geometryTaggedText,
int srid
)
[<SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)>]
static member STGeomFromText :
geometryTaggedText:SqlChars *
srid:int -> SqlGeography
public static function STGeomFromText(
geometryTaggedText : SqlChars,
srid : int
) : SqlGeography
パラメーター
- geometryTaggedText
型: System.Data.SqlTypes.SqlChars
返される SqlGeography インスタンスの WKT 表現です。
- srid
型: System.Int32
返される SqlGeography インスタンスの SRID (spatial reference ID) を表す int 式です。
戻り値
型: Microsoft.SqlServer.Types.SqlGeography
WKT 表現に基づいて構築された SqlGeography インスタンスです。
説明
STGeomFromText によって返された SqlGeography インスタンスの OGC 型は、対応する WKT 入力に設定されます。
このメソッドは、入力が適切な形式でない場合に、FormatException をスローします。