DWithin
Description
Determines if a geometry (testGeometry) object is located inside a perimeter distance from another geometry (containerGeometry) object.
Syntax
DWithin ( testGeometry, containerGeometry, unit, distance )
Arguments
containerGeometry and testGeometry are geometry objects (or expressions),
distance is a number (double) which represents the determining distance from the source geometry to the test geometry, and
unit is an area unit specification.
Example
Determines if one of the specified countries is located within a 10 miles boundary of the area defined using a box.
select DWithin([Geometry_Column],MI_Box(-13.36676789,8.05796847,79.06334219,62.70540978,'epsg:4326'), "mi", 10) as theResult from countries where country = ANY ('Mauritania','Mali','Algeria')
Remarks
Returns true if testGeometry is within the specified distance from containerGeometry, false otherwise. If either containerGeometry or testGeometry are null, false is returned. The function is performed using the coordinate system of the (containerGeometry).
Valid values for unit are the following distance units:
Value | Description |
---|---|
mi | miles |
km | kilometers |
in | inches |
ft | feet |
yd | yards |
mm | millimeters |
cm | centimeters |
m | meters |
survey ft | US Survey feet |
nmi | nautical miles |
twip | twips |
pt | points |
pica | picas |
degree | degrees |
li | links |
ch | chains |
rd | rods |