当startpoint
和endpoint
在sql server中的同一条路上时,您能否建议代码查找路由
SET @e = (
SELECT TOP 1 a.target
FROM Routes a
WHERE a.geom.STIntersects(geometry::Point(@endLon ,@endLat ,4326).STBuffer(0.002)) =
1
ORDER BY
geometry::Point(@endLon ,@endLat ,4326).STDistance(a.geom)
);