Analizowanie (geometrii typ danych)
Returns a geometry instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation.Parse() is equivalent to STGeomFromText(), with the exception that it assumes a spatial reference ID (SRID) of 0 as a parameter.Dane wejściowe mogą posiadać Z opcjonalnych (podwyższenie poziomu), a wartości M (miara).
Parse ( 'geometry_tagged_text' )
Argumenty
- geometry_tagged_text
Is the WKT representation of the geometry instance you wish to return.geometry_tagged_text is an nvarchar expression.
Zwracane typy
SQL Server typ zwrotny: geometry
Zwracany typ CLR: SqlGeometry
Remarks
Typ OGC geometry zwróconego przez wystąpienie Parse() jest ustawiona na odpowiadające im WKT, dane wejściowe.
Ciąg 'Null' będzie interpretowany jako wartość null geometry wystąpienie.
Ta metoda spowoduje wygenerowanie FormatException Jeśli dane wejściowe nie są well-formatted.
Przykłady
W poniższym przykładzie użyto Parse() Aby utworzyć geometry wystąpienie.
DECLARE @g geometry;
SET @g = geometry::Parse('LINESTRING (100 100, 20 180, 180 180)');
SELECT @g.ToString();
See Also