Name

GetFaceByPoint — 查找与给定点相交的面。

Synopsis

integer GetFaceByPoint(varchar atopology, geometry apoint, float8 tol1);

描述

查找具有给定公差的点参照的面。

该函数将有效地查找与以点为中心、公差为半径的圆相交的面。

如果没有面与给定查询位置相交,则返回0(通用面)。

如果多个面与查询位置相交,则会抛出异常。

可用性:2.0.0

增强:3.2.0更高效的实现和更清晰的约定,停止使用无效的拓扑。

示例

SELECT topology.GetFaceByPoint('ma_topo',geom, 10) As with1mtol, topology.GetFaceByPoint('ma_topo',geom,0) As withnotol
        FROM ST_GeomFromEWKT('POINT(234604.6 899382.0)') As geom;

         with1mtol | withnotol
        -----------+-----------
                         1 |         0
SELECT topology.GetFaceByPoint('ma_topo',geom, 1) As nearnode
        FROM ST_GeomFromEWKT('POINT(227591.9 893900.4)') As geom;

-- get error --
ERROR:  Two or more faces found

另请参阅

GetFaceContainingPoint, AddFace, GetNodeByPoint, GetEdgeByPoint