> ## Documentation Index
> Fetch the complete documentation index at: https://docs.less.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Geocode

> Get a GeoJSON Point and latitude/longitude from addresses or coordinates

The Geocode tool is part of the geospatial utilities, alongside [Directions](/tools/utilities/directions), [Polygon](/tools/utilities/polygon), and [Point-in-Polygon](/tools/utilities/point-in-polygon).

Use it when you need a consistent **GeoJSON Point** (and related fields) for downstream geospatial tools. It supports three modes:

1. **Forward geocoding** — text address plus country → coordinates and structured place fields.
2. **Reverse geocoding** — latitude and longitude → address-style properties and coordinates.
3. **Coordinates to GeoJSON** — numeric lat/lon columns → a `geometry` column with a Point struct only (no external geocoding call).

### Outputs (summary)

* **Forward** and **Reverse** append geocoding columns such as `geometry` (the GeoJSON point), `latitude`, `longitude`, structured fields (for example `street`, `locality`, `country`), and `geocode_error` when a row could not be resolved. With **max results** greater than 1, one input row can produce multiple output rows (one per matching feature).
* **Coordinates to GeoJSON** keeps your input columns and adds a `geometry` column: a GeoJSON Point  `[longitude, latitude]`.

<Tabs>
  <Tab title="Forward (address → coordinates)">
    <Steps>
      <Step title="Geocode mode">
        Choose **Address to coordinates (forward)**.
      </Step>

      <Step title="Address column">
        Select the string column that contains the free-text address to geocode.
      </Step>

      <Step title="Country column">
        Select the string column used to bias the search. Values must be [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements) country codes (for example `USA`, `GBR`).
      </Step>

      <Step title="Max results">
        Use the slider to choose between **1** and **10** matches to return per row. Higher values return more candidate features when the geocoder finds several matches.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Reverse (coordinates → address)">
    <Steps>
      <Step title="Geocode mode">
        Choose **Coordinates to address (reverse)**.
      </Step>

      <Step title="Latitude / Longitude">
        Pick the numeric columns for latitude and longitude (float columns).
      </Step>

      <Step title="Max results">
        Set **1–10** to cap how many reverse-geocode features are returned per input row.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Coordinates to GeoJSON (point)">
    <Steps>
      <Step title="Geocode mode">
        Choose **Coordinates to GeoJSON (point)**.
      </Step>

      <Step title="Latitude / Longitude">
        Select the numeric columns that define each point. The tool builds a Point geometry from them; invalid or null pairs may yield null geometry for that row.
      </Step>
    </Steps>
  </Tab>
</Tabs>
