ST_DFullyWithin — Tests if a geometry is entirely inside a distance of another
boolean ST_DFullyWithin(
geometry g1, geometry g2, double precision distance)
;
Returns true if g2
is entirely within distance
of g1
. Visually, the condition is true if g2
is contained within a distance
buffer of g1
. The distance is specified in units defined by the spatial reference system of the geometries.
Questa funzione incorpora l'uso di una comparazione tra i bounding box in modo da usare qualunque indice spaziale disponibile sulle geometrie. |
Disponibilità: 1.5.0
Changed: 3.5.0 : the logic behind the function now uses a test of containment within a buffer, rather than the ST_MaxDistance algorithm. Results will differ from prior versions, but should be closer to user expectations.
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 (VALUES ('POINT(1 1)', 'LINESTRING(1 5, 2 7, 1 9, 14 12)') ) AS v(geom_a, geom_b) dfullywithin10 | dwithin10 | dfullywithin20 ----------------+-----------+---------------- f | t | t