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

![](/files/TWra1Cto27WfWtjF5b6S) - 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>

![](/files/zyGfLYRXfFJRP1GDFoMU) - 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](/the-workspace/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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onum.com/the-workspace/pipelines/actions/transformation/field-transformation/field-transformation-operations/conversion/convert-distance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
