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

# geo.stDistance() function

-   Flux 0.78.0+
-   View InfluxDB support

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

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

`geo.stDistance` is used as a helper function for `geo.ST_Distance()`.

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

(Required) Record that defines the unit of measurement for distance.

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