AsGml (tipo di dati geography)
Restituisce la rappresentazione GML (Geography Markup Language) di un'istanza geography.
Per ulteriori informazioni su Geography Markup Language (GML), vedere la specifica Open Geospatial Consortium: OGC Specifications, Geography Markup Language (informazioni in lingua inglese).
Sintassi
.AsGml ( )
Tipi restituiti
SQL Server tipo restituito: xml
Tipo CLR restituito: SqlXml
Esempi
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>