1

Can you suggest the code to find the routing when the startpoint and endpoint are in the same road in 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)
    );
JACK
  • 11
  • 2

0 Answers0