关于GML(地理标记语言)的问题.

来源:百度知道 编辑:UC知道 时间:2024/05/29 23:47:00
哪位高人能帮小弟列出一个关于GML(地理标记语言)的代码呀?希望能有十几行吧代码吧,小弟采,还在初学中.

CREATE PROCEDURE GetNearbyStoresGML @Lat nvarchar(10), @Long nvarchar(10)
AS
-- Create a point geography instance based on the supplied location
DECLARE @SearchPoint geography
SET @SearchPoint = geography::Point(@Lat, @Long, 4326)

-- Create a polygon geography instance by adding a 100km buffer to the point
DECLARE @SearchArea geography
SET @SearchArea = @SearchPoint.STBuffer(100000)

--Return the search area and all store locations that intersect it
SELECT 'Search Area', '100 KM radius', @SearchArea.AsGml()
UNION ALL
SELECT StoreName,
StoreAddress + ', Tel:' + StorePhone AS ContactDetails,
StoreLocation.AsGml() As StoreGML
FROM Stores
WHERE StoreLocation.STIntersects(@SearchArea) = 1
GO

我已经用百度HI发给你了