当startPoint和endPoint在同一条路上时执行

时间:2016-01-06 06:09:52

标签: sql-server sql-server-2008 routing mysql-spatial

startpointendpoint在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)
    );

0 个答案:

没有答案