AsGml (type de données geography)

Retourne la représentation GML (Geography Markup Language) d'une instance geography.

Pour plus d'informations sur le langage GML, consultez les spécifications Open Geospatial Consortium (en anglais) : OGC Specifications, Geography Markup Language.

Syntaxe

.AsGml ( )

Types des valeurs de retour

SQL Server type de retour : xml

Type de retour CLR : SqlXml

Exemples

L'exemple suivant crée une instance LineString et utilise AsGML() pour retourner la description GML de l'instance.

DECLARE @g geography;
SET @g = geography::STGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656)', 4326);
SELECT @g.AsGml();

Cette méthode retourne la description en tant qu'instance LineString.

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