ST_3DDWithin — 二つの3次元ジオメトリが与えらえれた3次元距離内にあるかどうかをテストします。
boolean ST_3DDWithin(
geometry g1, geometry g2, double precision distance_of_srid)
;
二つのジオメトリ値の3次元距離がdistance_of_srid
以下ならTRUE
を返します。距離の単位はジオメトリの空間参照系の単位です。この関数から意味のある結果を得るには、引数に使うジオメトリを同じ空間系 (同じSRIDを持つ)にしなければなりません。
![]() | |
This function automatically includes a bounding box comparison that makes use of any spatial indexes that are available on the geometries. |
This function supports 3d and will not drop the z-index.
This function supports Polyhedral surfaces.
This method implements the SQL/MM specification. SQL-MM ?
Availability: 2.0.0
-- ジオメトリの例 - 単位はメートル (SRID: 2163 米国ナショナルアトラス正積図法) -- (2次元のポイントとラインとに比較される3次元のポイントとライン) -- ご注意: 現在垂直データムに対応しておらず、Z値は変換されず、同じ単位と仮定されます。 SELECT ST_3DDWithin( ST_Transform(ST_GeomFromEWKT('SRID=4326;POINT(-72.1235 42.3521 4)'),2163), ST_Transform(ST_GeomFromEWKT('SRID=4326;LINESTRING(-72.1260 42.45 15, -72.123 42.1546 20)'),2163), 126.8 ) As within_dist_3d, ST_DWithin( ST_Transform(ST_GeomFromEWKT('SRID=4326;POINT(-72.1235 42.3521 4)'),2163), ST_Transform(ST_GeomFromEWKT('SRID=4326;LINESTRING(-72.1260 42.45 15, -72.123 42.1546 20)'),2163), 126.8 ) As within_dist_2d; within_dist_3d | within_dist_2d ----------------+---------------- f | t