---
title: geo.ST_Distance() function
description: geo.ST_Distance() returns the distance from a given region to a specified GIS geometry.
url: https://docs.influxdata.com/flux/v0/stdlib/experimental/geo/st_distance/
estimated_tokens: 579
product: Flux
version: v0
---

# geo.ST\_Distance() function

-   Flux 0.78.0+
-   View InfluxDB support

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

`geo.ST_Distance()` returns the distance from a given region to a specified GIS geometry.

##### Function type signature

```js
(geometry: A, region: B, ?units: {distance: string}) => float where A: Record, B: 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.

### 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/)
