ST_DISTANCE
Calculates the two-dimensional cartesian minimum distance between two WKT formatted geometries in the units of the inputs.
Syntax
Arguments
Name | Type | Description | Default Value |
---|---|---|---|
first | string | A WKT formatted spatial object | |
second | string | A WKT formatted spatial object |
Returns
Returns a double
value.
Examples
first | second | Output |
---|---|---|
'POINT (152.352298 -24.875975)' | 'POINT (151.960336 -24.993289)' | 0.409141520796879 |
'POLYGON((-10 30, -40 40, -10 -20, 40 20, 0 0, -10 30))' | 'POINT(16 0)' | 0.6246950475544248 |
Transformation job example
SQL
Query result
first | second | Output |
---|---|---|
'POINT (152.352298 -24.875975)' | 'POINT (151.960336 -24.993289)' | 0.409141520796879 |
Last updated