名前

ST_3DDFullyWithin — 二つの3次元ジオメトリが完全に与えらえれた3次元距離内にあるかどうかをテストします。

概要

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

説明

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

[注記]

この関数を実行すると、対象ジオメトリにおいて使用できるインデックスを使用したバウンディングボックスによる比較が自動的に行われます。

Availability: 2.0.0

この関数は3次元に対応し、Z値を削除しません。

この関数は多面体サーフェスに対応しています。

This example compares distance-within predicates in 2D and 3D. The point is distance-within the line in 3D, but the full 3D line is not within the same distance of the point.

Code
WITH data AS (
  SELECT
    'POINT(1 1 2)'::geometry AS geom_a,
    'LINESTRING(1 5 2,2 7 20,1 9 100,14 12 3)'::geometry AS geom_b
)
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 data;
出力:
d3dfullywithin10 | d3dwithin10 | d2dfullywithin20 | d3dfullywithin20
------------------+-------------+------------------+------------------
 f                | t           | t                | f 
Figure
Geometry figure for visual-st-3ddfullywithin-01