ST_DISTANCE
Updated: February 1, 2017
Applies To: Azure
Returns the distance between two points in meters. If used with Polygons will return 0.
Syntax
ST_DISTANCE ( pointA, pointB )
PointA
The point to measure distance from.
PointB
The point to measure distance to.
Returns the distance between two points in meters.
SELECT
ST_DISTANCE(input.car1Position, input.car2Position)
FROM input
Input Example
| carPosition | warehouse |
|---|---|
| {“type”:”Point”, “coordinates”: [-5.0, -5.0]} | {“type”:”Point”, “coordinates”: [0.0, 0.0]} |
Output Example
784028.74077501823
Show: