Name

CG_Distance — Computes the minimum distance between two geometries

Synopsis

double precision CG_Distance( geometry geomA , geometry geomB );

描述

Computes the minimum distance between two geometries.

Performed by the SFCGAL module

[Note]

NOTE: this function returns a double precision value representing the distance.

可用性:3.5.0

该方法需要SFCGAL后端。

此函数支持三角形和不规则三角网面 (TIN)。

几何示例

SELECT CG_Distance('LINESTRING(0.0 0.0,-1.0 -1.0)', 'LINESTRING(3.0 4.0,4.0 5.0)');
        cg_distance
        -------------
        2.0
        (1 row)

相关信息

CG_3DDistance, CG_Distance