名前

ST_3DDFullyWithin — 3次元ジオメトリが他のジオメトリとの距離が指定した範囲内ならtrueを返します。

概要

boolean ST_3DDFullyWithin(geometry g1, geometry g2, double precision distance);

説明

3次元ジオメトリが他のジオメトリとの距離が、完全に指定した範囲内ならtrueを返します。距離の単位はジオメトリの空間参照系で定義されているものとされます。この関数が意味を持つためには、与えられるジオメトリは両方とも同じ座標系で同じSRIDを持つ必要があります。

[注記]

この関数の呼び出しによって、ジオメトリで使用可能なインデクスを使用したバウンディングボックスの比較が自動的に行われます。

Availability: 2.0.0

This function supports 3d and will not drop the z-index.

This function supports Polyhedral surfaces.

-- 完全に中に入るかどうか (ST_3DDFullyWithin)と、
-- 中に入るかどうか (ST_3DDWithin)との比較を示します。
-- また、
-- ライン/ポイントを2次元にした場合に完全に中に入るかどうか (ST_DFullyWithin)と、
-- 3次元長のままで完全に中に入るかどうか (ST_3DDFullyWithin)との比較も
-- 示します。
                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 

関連情報

ST_3DMaxDistance, ST_3DDWithin, ST_DWithin, ST_DFullyWithin