# Geo (GeoGenerator)

The [Geo](https://docs.tonic.ai/app/generation/generators/generator-reference/geo) generator is used to mask latitude or longitude values.

## Link object structure <a href="#generator-api-geo-link-object" id="generator-api-geo-link-object"></a>

The Geo generator supports linking. Typically, the Geo generator is assigned to a latitude column and a longitude column and then the columns are linked.

The Geo generator does not support consistency. You cannot configure differential privacy.

The `metadata` object is populated from the [`GeoMetadata`](https://app.tonic.ai/apidocs/index.html#/models/GeoMetadata) object. `geoType` indicates the type of value (latitude or longitude) that is in the column.

```json
{
  "schema": "string",
  "table": "string",
  "column": "string",
  "path": "string",  //JSON fields only
  "dataType": "string",  //MongoDB, Amazon DynamoDB, and JSON fields only
  "metadata": {
    "presetId": "string",
    "generatorId": "GeoGenerator",
    "geoType": "enum",
    "encryptionProcessor": "x-on", //To use configured Structural data encryption
    "customValueProcessor": "string"  //If custom value processor applied
  }
}
```

## Example replacement <a href="#generator-api-geo-replacement" id="generator-api-geo-replacement"></a>

In this example replacement for the Geo generator, the `lat` and `long` columns are assigned the Geo generator and linked.

```json
{
  "name": "lat,long",
  "schema": "public",
  "table": "latlong",
  "links": [
    {
      "schema": "public",
      "table": "latlong",
      "column": "lat",
      "metadata": {
        "presetId": "GeoGenerator",
        "generatorId": "GeoGenerator",
        "geoType": "Latitude"
      }
    },
    {
      "schema": "public",
      "table": "latlong",
      "column": "long",
      "metadata": {
        "presetId": "GeoGenerator",
        "generatorId": "GeoGenerator",
        "geoType": "Longitude"
      }
    }
  ]
}
```
