AsGml (geometry)

AsGml (geometry)#

Returns the Geography Markup Language (GML) representation of a geometry instance.

For more information on Geography Markup Language, see the Open Geospatial Consortium Specification: OGC Specifications, Geography Markup Language.

Syntax#

.AsGml ()

Return type#

xml

Example#

Create a LineString instance and uses AsGML() to return the GML description of the instance.

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

See Also#