Condividi tramite


AsGml - tipo di dati geography

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 geography.

Per altre informazioni su Geography Markup Language (GML), vedere la specifica 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 geography;  
SET @g = geography::STGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656)', 4326);  
SELECT @g.AsGml();  

Questo metodo restituisce la descrizione come istanza LineString.

<LineString xmlns="http://www.opengis.net/gml"><posList>47.656 -122.36 47.656 -122.343</posList></LineString>  

Vedere anche

Metodi estesi sulle istanze di geografia