> For the complete documentation index, see [llms.txt](https://docs.onum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onum.com/pipelines/actions/transformation/field-transformation/field-transformation-operations/conversion/convert-distance.md).

# Convert distance

## Description

This operation converts values between different units of length or distance.

***

## Data types

These are the input/output expected data types for this operation:

### Input data <a href="#input-data" id="input-data"></a>

`String` - Values whose unit of length you want to transform. They must be strings representing numbers.

### Output data <a href="#output-data" id="output-data"></a>

`String` - Resulting values after transforming them to the selected unit of length.

***

## Parameters

These are the parameters you need to configure to use this operation (mandatory parameters are marked with a <mark style="color:red;">**\***</mark>):

<details>

<summary>Input units<mark style="color:red;"><strong>*</strong></mark></summary>

Enter the unit of length of your input data. You must indicate one of the following:

**Metric**

* `Nanometres (nm)`
* `Micrometres (μm)`
* `Millimetres (mm)`
* `Centimetres (cm)`
* `Metres (m)`
* `Kilometres (km)`

**Imperial**

* `Thou (th)`
* `Inches (in)`
* `Feet (ft)`
* `Yards (yd)`
* `Chains (ch)`
* `Furlongs (fur)`
* `Miles (mi)`
* `Leagues (lea)`

**Maritime**

* `Fathoms (ftm)`
* `Cables`
* `Nautical miles`

**Comparisons**

* `Cars (4m)`
* `Buses (8.4m)`
* `American football fields (91m)`
* `Football pitches (105m)`

**Astronomical**

* `Earth-to-Moons`
* `Earth's equators`
* `Astronomical units (au)`
* `Light-years (ly)`
* `Parsecs (pc)`

</details>

<details>

<summary>Output units<mark style="color:red;"><strong>*</strong></mark></summary>

Enter the required unit of length of your output data. You must indicate one of the following:

**Metric**

* `Nanometres (nm)`
* `Micrometres (μm)`
* `Millimetres (mm)`
* `Centimetres (cm)`
* `Metres (m)`
* `Kilometres (km)`

**Imperial**

* `Thou (th)`
* `Inches (in)`
* `Feet (ft)`
* `Yards (yd)`
* `Chains (ch)`
* `Furlongs (fur)`
* `Miles (mi)`
* `Leagues (lea)`

**Maritime**

* `Fathoms (ftm)`
* `Cables`
* `Nautical miles`

**Comparisons**

* `Cars (4m)`
* `Buses (8.4m)`
* `American football fields (91m)`
* `Football pitches (105m)`

**Astronomical**

* `Earth-to-Moons`
* `Earth's equators`
* `Astronomical units (au)`
* `Light-years (ly)`
* `Parsecs (pc)`

</details>

***

## Example

Suppose you want to convert a series of events from **meters** into **yards**:

1. In your Pipeline, open the required [Action](/pipelines/actions.md) configuration and select the input **Field**.
2. In the **Operation** field, choose **Convert distance**.
3. Set **Input units** to `Metres (m)`.
4. Set **Output units** to `Yards (yd)`.
5. Give your **Output field** a name and click **Save**. The unit of length of the values in your input field will be transformed. For example:

```
Input data - "100"

Input units - "Metres (m)"

Output units - "Yards (yd)"

Output data - "109.3613298"
```

{% hint style="info" %}
You can try out operations with specific values using the **Input** field above the operation. You can enter the value in the example above and check the result in the **Output** field.
{% endhint %}
