ST_3DDFullyWithin — Testar om två 3D-geometrier är helt inom ett givet 3D-avstånd
boolean ST_3DDFullyWithin(
geometry g1, geometry g2, double precision distance)
;
Returnerar true om 3D-geometrierna är helt inom det angivna avståndet från varandra. Avståndet anges i enheter som definieras av geometriernas spatiala referenssystem. För att denna funktion ska vara meningsfull måste båda källgeometrierna ha samma koordinatprojektion och samma SRID.
![]() |
|
Denna funktion inkluderar automatiskt en jämförelse av begränsningsrutor som använder alla spatiala index som finns tillgängliga för geometrierna. |
Tillgänglighet: 2.0.0
Denna funktion stöder 3d och kommer inte att tappa z-index.
Denna funktion stöder polyedriska ytor.
-- This compares the difference between fully within and distance within as well -- as the distance fully within for the 2D footprint of the line/point vs. the 3d fully within SELECT ST_3DDFullyWithin(geom_a, geom_b, 10) as D3DFullyWithin10, ST_3DDWithin(geom_a, geom_b, 10) as D3DWithin10, ST_DFullyWithin(geom_a, geom_b, 20) as D2DFullyWithin20, ST_3DDFullyWithin(geom_a, geom_b, 20) as D3DFullyWithin20 from (select ST_GeomFromEWKT('POINT(1 1 2)') as geom_a, ST_GeomFromEWKT('LINESTRING(1 5 2, 2 7 20, 1 9 100, 14 12 3)') as geom_b) t1; d3dfullywithin10 | d3dwithin10 | d2dfullywithin20 | d3dfullywithin20 ------------------+-------------+------------------+------------------ f | t | t | f