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 geography data una rappresentazione nel subset SQL Server di Geography Markup Language (GML).
Per altre informazioni su GML, vedere le specifiche Open Geospatial Consortium (OGC): OGC Specifications, Geography Markup Language
Questo metodo con tipo di dati geography supporta le istanze FullGlobe o le istanze spaziali con dimensioni maggiori di un emisfero.
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 geography da restituire.
Tipi restituiti
Tipo SQL Server restituito: geography
Tipo CLR restituito: SqlGeography
Remarks
Questo metodo genera un'eccezione FormatException se l'input non è formattato in modo corretto.
Questo metodo genererà un'eccezione ArgumentException se l'input contiene un bordo opposto.
Examples
Nell'esempio seguente viene utilizzato il metodo GeomFromGml() per creare un'istanza geography.
DECLARE @g geography;
DECLARE @x xml;
SET @x = '<LineString xmlns="http://www.opengis.net/gml"><posList>47.656 -122.36 47.656 -122.343</posList></LineString>';
SET @g = geography::GeomFromGml(@x, 4326);
SELECT @g.ToString();
Nell'esempio seguente viene utilizzato il metodo GeomFromGml() per creare un'istanza FullGlobe``geography.
DECLARE @g geography;
DECLARE @x xml;
SET @x = '<FullGlobe xmlns="http://schemas.microsoft.com/sqlserver/2011/geography" />';
SET @g = geography::GeomFromGml(@x, 4326);
SELECT @g.ToString();