---
title: "reverse geocode · RUAL Documentation"
description: "Enriches an array of objects in place: for each item it reads the geo point at the location key and writes the resolved city, province, country and coun…"
canonical: https://docs.rual.nl/block-types/array/array_reverse_geocode
language: en
---

# reverse geocode

This block is part of the [`array`](https://docs.rual.nl/block-types/array) group and was last modified in core [`v15.0.0`](https://docs.rual.nl/core-versions/150000).

Enriches an array of objects in place: for each item it reads the geo point at the location key and writes the resolved city, province, country and country code into the configured output keys. Offline lookup (embedded multi-country dataset).

- Array required `array` Array of objects, each holding a geo point at the location key.

- Location key required `value` The field path in each object that holds the geo point (e.g. location.location). Expects { lat, lon }.

- Location fallback key `value` Optional second field path on the same object, used when the primary location key has no valid { lat, lon }.

- Street key `value` Output field path for the nearest named road. Empty when no road is within range or the road network is not loaded. Leave empty to skip.

Default `street`

- City key `value` Output field path for the resolved city (e.g. city or address.city). Leave empty to skip.

Default `city`

- Neighborhood key `v15.0.0` `value` Output field path for the wijk/district when the point sits inside a larger city (empty otherwise). Leave empty to skip.

Default `neighborhood`

- Province key `value` Output field path for the resolved province. Leave empty to skip.

Default `province`

- Country key `value` Output field path for the resolved country. Leave empty to skip.

Default `country`

- Country code key `value` Output field path for the resolved ISO country code. Leave empty to skip.

Default `country_code`

- Array `array` The input array with each item enriched in place.

- Unresolved `array` Items that had no valid location and could not be geocoded.

Enriches each object IN PLACE: reads { lat, lon } at location_key (falling back to location_fallback_key) and writes the resolved street, city, neighborhood, province, country and country code to each non-empty output key. The array pin always returns ALL items; items that are non-objects, lack valid coordinates or fail resolution are additionally listed on unresolved, appearing in BOTH outputs. With no location_key or no dataset loaded, the input passes through untouched.

| `geocode` |
| --- |
| `city` |
| `province` |
| `country` |
| `geo` |

A typical wiring for [reverse geocode](https://docs.rual.nl/block-types/array/array_reverse_geocode): [with values](https://docs.rual.nl/block-types/array/array_of_values) feeds the `array` pin; [value](https://docs.rual.nl/block-types/value/value_default) feeds the `location_key` pin; the `array` out pin feeds [length](https://docs.rual.nl/block-types/array/array_length).

![Studio canvas example for the reverse geocode block: typical wiring for reverse geocode.](https://docs.rual.nl/canvas-examples/array_reverse_geocode.png)

### Used in these guides

These documentation pages use or explain this block:

- [Location Blocks](https://docs.rual.nl/reference/location-blocks)

### Version history

Introduced in [`v15.0.0`](https://docs.rual.nl/core-versions/150000).
