ST_MaxDistance
Signature
Description
Returns the 2-dimensional longest distance between the points of two geometries (geomA
and geomB
).
If geomA
and geomB
are the same, the function will return the longest distance between the two farthest vertices in this geometry.
Distance is measured in the units of the spatial reference system.
To return the geometry (LINESTRING
) that correspond to the longest distance, the user may use ST_LongestLine
.
Examples
Cases where geomA
and geomB
are different
Case where geomA
is equal to geomB
See also