STLineFromText (geography Data Type)
Zwraca geography wystąpienie z reprezentacja OGC (Otwieranie lokalizacji geograficznych Consortium) Well-Known tekstu (WKT), rozszerzony z dowolnego Z (podniesienie) i wartości M (miara) przez wystąpienie.
STLineFromText ( 'linestring_tagged_text' , SRID )
Argumenty
linestring_tagged_text
Is the WKT representation of the geographyLineString instance you wish to return.linestring_tagged_text is an nvarchar(max) expression.SRID
Is an int expression representing the spatial reference ID (SRID) of the geographyLineString instance you wish to return.
Zwracane typy
SQL Server typ zwrotny: geography
Zwracany typ CLR: SqlGeography
Typ OGC: LineString
Remarks
Ta metoda wygeneruje FormatException Jeśli dane wejściowe nie są well-formatted.
Przykłady
W poniższym przykładzie użyto STLineFromText() Aby utworzyć geography wystąpienie.
DECLARE @g geography;
SET @g = geography::STLineFromText('LINESTRING(-122.360 47.656, -122.343 47.656 )', 4326);
SELECT @g.ToString();