Condividi tramite


AsGml (tipo di dati geometry)

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

Per ulteriori informazioni su Geography Markup Language (GML), vedere le seguenti specifiche Open Geospatial Consortium:OGC Specifications, Geography Markup Language.

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

Vedere anche

Altre risorse

Metodi estesi sulle istanze di geometria