我正在尝试进行一些站点集水量分析,我想创建一个新表,其位置在距已知点特定半径内。
我目前正在使用下面的代码钓鱼,但没有成功。 SiteLocation和HHlocation是我要用作STBuffer和STIntersect函数的参考点的2个单独表中的地理点列。
SELECT Top 10
[dbo].[Households].[LocationID] AS 'HH ID',
null AS 'Site ID',
[dbo].[Households].[HHLocation] AS 'HH Point',
null AS 'Site Point'
*[dbo].[Households].[HHLocation].STBuffer(5 * 1000) as 'Dynamic Buffer'
FROM [Households] union all
SELECT Top 10
null AS 'HH ID',
[dbo].[Sites].[LocationID] AS 'Site ID',
null AS 'HH Point',
[dbo].[Sites].[SiteLocation] AS 'Site Point',
null as 'Dynamic Buffer'
from [Sites]
*ON [dbo].[Sites].[SiteLocation].STIntersects([dbo].[Households].[HHLocation].STBuffer(5 * 1000)) = 1