ST_DFullyWithin — 如果两个几何完全在给定距离内,则返回True
boolean ST_DFullyWithin(
geometry g1, geometry g2, double precision distance)
;
如果几何图形完全在彼此的指定距离内,则返回True。距离以几何图形的空间参考系定义的单位指定。要使此函数有意义,源几何图形必须具有相同的坐标投影,并且具有相同的SRID。
![]() | |
This function automatically includes a bounding box comparison that makes use of any spatial indexes that are available on the geometries. |
可用性:1.5.0
postgis=# SELECT ST_DFullyWithin(geom_a, geom_b, 10) as DFullyWithin10, ST_DWithin(geom_a, geom_b, 10) as DWithin10, ST_DFullyWithin(geom_a, geom_b, 20) as DFullyWithin20 from (select ST_GeomFromText('POINT(1 1)') as geom_a,ST_GeomFromText('LINESTRING(1 5, 2 7, 1 9, 14 12)') as geom_b) t1; ----------------- DFullyWithin10 | DWithin10 | DFullyWithin20 | ---------------+----------+---------------+ f | t | t |