# ＊ GPSNoiser

{% hint style="info" %}
**＊SDV Enterprise Feature.** This feature is available to our licensed users and is not currently in our public library. For more information, visit our page to [Explore SDV](https://docs.sdv.dev/sdv/explore/sdv-enterprise/compare-features).
{% endhint %}

The `GPSNoiser` creates realistic GPS coordinates from roughly the same areas as the real data. When transforming your data, it adds noise using a pre-defined distance to preserve privacy. When reverse transforming, it chooses from the noised data points.

<figure><img src="/files/IR2adjEIPpvvmgB9o6vt" alt=""><figcaption></figcaption></figure>

```python
from rdt.transformers.gps import GPSNoiser

transformer = GPSNoiser(noise_km=25.0)
```

## Parameters

**`noise_km`**: Add this argument to determine the overall magnitude of noise to add, in kilometers

<table data-header-hidden><thead><tr><th width="203"></th><th></th></tr></thead><tbody><tr><td>(default) <code>10.0</code></td><td>Add roughly 10km noise to the real GPS coordinates, in any direction<br><em>For reference, 10km is roughly the diameter of a city like Paris</em> </td></tr><tr><td><code>&#x3C;float></code></td><td>A floating point value in the range <code>(0.0, 1000.0)</code> that describes the noise radius. <br><em>For reference 1000km is roughly the length of California, or the distance between Paris and Barcelona.</em> </td></tr></tbody></table>

## Examples

{% hint style="info" %}
**This transformer takes exactly 2 columns as input.** Make sure that you have 1 column with sdtype `latitude` and 1 column with sdtype `longitude`.
{% endhint %}

```python
from rdt.transformers.gps import GPSNoiser

transformer = GPSNoiser(noise_km=25.0)

# in the hypertransformer, ensure that each column has a supported sdtype
ht.update_sdtypes(column_name_to_sdtype={
    'user_lat': 'latitude',
    'user_lon': 'longitude',
})

# in the hypertransformer, assign set of columns to your transformer
ht.update_transformers(column_name_to_transformer={
    ('user_lat', 'user_lon'): transformer
})
```

## FAQs

<details>

<summary>What happens to missing values?</summary>

This transformer recreates missing GPS coordinates during the reverse transform phase in the same proportion as the original data.

Note that a GPS coordinate is considered *missing* if either the latitude or longitude are null.

</details>


---

# 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.sdv.dev/rdt/transformers-glossary/deep-data-understanding/gps-coordinates/gpsnoiser.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.
