AsGml (tipo di dati geometry)

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

Restituisce la rappresentazione GML (Geography Markup Language) di un'istanza geometry.

Per ulteriori informazioni sul Geography Markup Language, consulta la seguente Specifica dell'Open Geospatial Consortium: OGC Specifications, Geography Markup Language.

Syntax

.AsGml ( )  

Tipi restituiti

Tipo SQL Server restituito:xml

Tipo CLR restituito: SqlXml

Remarks

Examples

Nell'esempio seguente viene creata un'istanza LineString e viene utilizzato AsGML() per restituire la descrizione GML dell'istanza.

DECLARE @g geometry;  
SET @g = geometry::STGeomFromText('LINESTRING(0 0, 0 1, 1 0)', 0)  
SELECT @g.AsGml();  

Questo metodo restituisce la descrizione come istanza LineString.

<LineString xmlns="http://www.opengis.net/gml">  
<posList>0 0 0 1 1 0</posList></LineString>