Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Si applica a:SQL Server
Database 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();