---
title: geo.ST_DWithin() function
description: geo.ST_DWithin() tests if the specified region is within a defined distance from the specified GIS geometry and returns true or false.
url: https://docs.influxdata.com/flux/v0/stdlib/experimental/geo/st_dwithin/
estimated_tokens: 289
product: Flux
version: v0
publisher: InfluxData
canonical: https://docs.influxdata.com/flux/v0/stdlib/experimental/geo/st_dwithin/
date: '2024-04-08T16:01:02-06:00'
lastmod: '2024-04-08T16:01:02-06:00'
---

* Flux 0.78.0+

InfluxDB support

> [!Important]
> `geo.ST_DWithin()` is experimental and [subject to change at any time](/flux/v0/stdlib/experimental/#experimental-packages-are-subject-to-change).

`geo.ST_DWithin()` tests if the specified region is within a defined distance from
the specified GIS geometry and returns `true` or `false`.

##### Function type signature

```js
(distance: A, geometry: B, region: C, ?units: {distance: string}) => bool where A: Comparable + Equatable, B: Record, C: Record
```

For more information, see [Function type signatures](/flux/v0/function-type-signatures/).

## Parameters

### region

(Required)
Region to test. Specify record properties for the shape.

### geometry

(Required)
GIS geometry to test. Can be either point or linestring geometry.

### distance

(Required)
Maximum distance allowed between the region and geometry.
Define distance units with the `geo.units` option.

### units

Record that defines the unit of measurement for distance.
Default is the `geo.units` option.

#### Related

* [Work with geo-temporal data](/influxdb/v2/query-data/flux/geo/)

[geotemporal](/flux/v0/tags/geotemporal/)
