Condividi tramite


GeomFromGml (tipo di dati geometry)

Si applica a:SQL ServerDatabase SQL di AzureIstanza gestita di SQL di AzureDatabase SQL in Microsoft Fabric

Costruisce un'istanza geometry data una rappresentazione nel subset SQL Server di Geography Markup Language (GML).

Per ulteriori informazioni su Geography Markup Language, vedere le seguenti specifiche Open Geospatial Consortium:

Specifiche OGC, Geography Markup Language

Syntax

  
GeomFromGml ( GML_input, SRID )  

Arguments

GML_input
Input XML da cui GML restituirà un valore.

SRID
Espressione int che rappresenta l'identificatore SRID dell'istanza geometry da restituire.

Tipi restituiti

Tipo SQL Server restituito: geometry

Tipo CLR restituito: SqlGeometry

Remarks

Questo metodo genererà un'eccezione FormatException se l'input non è formattato in modo corretto.

Examples

Nell'esempio seguente viene utilizzato il metodo GeomFromGml() per creare un'istanza geometry.

DECLARE @g geometry;  
DECLARE @x xml;  
SET @x = '<LineString xmlns="http://www.opengis.net/gml"> <posList>100 100 20 180 180 180</posList> </LineString>';  
SET @g = geometry::GeomFromGml(@x, 0);  
SELECT @g.ToString();  

Vedere anche

Metodi di geometria statici estesi