<refname>ST_DWithin</refname>
<refpurpose>Returns true if the geometries are within the specified
- distance of one another. For geometry units are in those of spatial reference and For geography units are in meters.</refpurpose>
+ distance of one another. For geometry units are in those of spatial reference and For geography units are in meters and measurement is
+ defaulted to use_spheroid=true (measure around spheroid), for faster check, use_spheroid=false to measure along sphere.</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcprototype>
- <funcdef>boolean <function>ST_DWithin</function></funcdef>
-
- <paramdef><type>geometry </type>
- <parameter>g1</parameter></paramdef>
-
- <paramdef><type>geometry </type>
- <parameter>g2</parameter></paramdef>
-
- <paramdef><type>double precision </type>
- <parameter>distance_of_srid</parameter></paramdef>
+ <funcdef>boolean <function>ST_DWithin</function></funcdef>
+ <paramdef><type>geometry </type>
+ <parameter>g1</parameter></paramdef>
+
+ <paramdef><type>geometry </type>
+ <parameter>g2</parameter></paramdef>
+
+ <paramdef><type>double precision </type>
+ <parameter>distance_of_srid</parameter></paramdef>
</funcprototype>
- <funcprototype>
- <funcdef>boolean <function>ST_DWithin</function></funcdef>
-
- <paramdef><type>geography </type>
- <parameter>gg1</parameter></paramdef>
-
- <paramdef><type>geography </type>
- <parameter>gg2</parameter></paramdef>
-
- <paramdef><type>double precision </type>
- <parameter>distance_meters</parameter></paramdef>
+ <funcprototype>
+ <funcdef>boolean <function>ST_DWithin</function></funcdef>
+ <paramdef><type>geography </type>
+ <parameter>gg1</parameter></paramdef>
+
+ <paramdef><type>geography </type>
+ <parameter>gg2</parameter></paramdef>
+
+ <paramdef><type>double precision </type>
+ <parameter>distance_meters</parameter></paramdef>
+ </funcprototype>
+
+ <funcprototype>
+ <funcdef>boolean <function>ST_DWithin</function></funcdef>
+ <paramdef><type>geography </type>
+ <parameter>gg1</parameter></paramdef>
+
+ <paramdef><type>geography </type>
+ <parameter>gg2</parameter></paramdef>
+
+ <paramdef><type>double precision </type>
+ <parameter>distance_meters</parameter></paramdef>
+
+ <paramdef><type>boolean </type>
+ <parameter>use_spheroid</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<title>Description</title>
<para>Returns true if the geometries are within the specified distance
- of one another. The distance is specified in units defined by the
+ of one another.</para>
+ <para>For Geometries: 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 coorindate projection,
having the same SRID.</para>
-
+
+ <para>For geography units are in meters and measurement is
+ defaulted to use_spheroid=true (measure around WGS 84 spheroid), for faster check, use_spheroid=false to measure along sphere.
+ </para>
<note>
<para>This function call will automatically include a bounding box
comparison that will make use of any indexes that are available on