AsGml - geography Data Type
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
Returns the Geography Markup Language (GML) representation of a geography instance.
For more information on Geography Markup Language, see the Open Geospatial Consortium Specification: OGC Specifications, Geography Markup Language.
Syntax
.AsGml ( )
Note
To view Transact-SQL syntax for SQL Server 2014 (12.x) and earlier versions, see Previous versions documentation.
Return Types
SQL Server return type: xml
CLR return type: SqlXml
Remarks
Examples
The following example creates a LineString
instance and uses AsGML()
to return the GML description of the instance.
DECLARE @g geography;
SET @g = geography::STGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656)', 4326);
SELECT @g.AsGml();
This method returns the description as a LineString
instance.
<LineString xmlns="http://www.opengis.net/gml"><posList>47.656 -122.36 47.656 -122.343</posList></LineString>
See Also
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho