2

ST_3DDFullyWithin

 3 years ago
source link: http://postgis.net/docs/ST_3DDFullyWithin.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
ST_3DDFullyWithin

Synopsis

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

Description

Returns true if the 3D geometries are fully within the specified distance of one another. The distance is specified in units defined by the spatial reference system of the geometries. For this function to make sense, the source geometries must both be of the same coordinate projection, having the same SRID.

[Note]

This function call will automatically include a bounding box comparison that will make use of any indexes that are available on the geometries.

Availability: 2.0.0

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

check.png This function supports Polyhedral surfaces.

Examples

		-- 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 

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK