我正在尝试根据线中点与多边形相交的结果设置一列。我知道我可以用类似的东西来调用线中点
X_Coord = SHAPE.STPointN(SHAPE.STNumPoints()/2).STX ,
Y_Coord = SHAPE.STPointN(SHAPE.STNumPoints()/2).STY
但如何将其传递给
update GRSM_ROADS
set QuadName = USGS_24K_TOPOMAP_BOUNDARIES.NAME
from GRSM_ROADS
inner join USGS_24K_TOPOMAP_BOUNDARIES
on dbo.GRSM_ROADS.Location_ID = GRSM_ROADS.Location_ID
where (USGS_24K_TOPOMAP_BOUNDARIES.SHAPE.STIntersects(dbo.GRSM_ROADS.shape) = 1);
是一个谜。我尝试了运行的 stcontains 和 stintersects,但输出为空,这表明我没有正确确定线中点何时或何处与多边形相交。
SQL 2008 R2