nominatim_fdw

nominatim_fdw

nominatim_fdw : Nominatim Foreign Data Wrapper for PostgreSQL

Overview

ID Extension Package Version Category License Language
8680
nominatim_fdw
nominatim_fdw
1.1.0
FDW
MIT
C
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--s-d-r
No
Yes
No
Yes
yes
no

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT
PGDG
1.1.0
18
17
16
15
14
nominatim_fdw -
RPM
PGDG
1.1.0
18
17
16
15
14
nominatim_fdw_$v -
DEB
PIGSTY
1.1.0
18
17
16
15
14
postgresql-$v-nominatim-fdw -
Linux / PG PG18 PG17 PG16 PG15 PG14
el8.x86_64
PGDG 1.1.0
PGDG 1.1.0
PGDG 1.1.0
PGDG 1.1.0
PGDG 1.1.0
el8.aarch64
PGDG 1.1.0
PGDG 1.1.0
PGDG 1.1.0
PGDG 1.1.0
PGDG 1.1.0
el9.x86_64
PGDG 1.1.0
PGDG 1.1.0
PGDG 1.1.0
PGDG 1.1.0
PGDG 1.1.0
el9.aarch64
PGDG 1.1.0
PGDG 1.1.0
PGDG 1.1.0
PGDG 1.1.0
PGDG 1.1.0
el10.x86_64
PGDG 1.1.0
PGDG 1.1.0
PGDG 1.1.0
PGDG 1.1.0
PGDG 1.1.0
el10.aarch64
PGDG 1.1.0
PGDG 1.1.0
PGDG 1.1.0
PGDG 1.1.0
PGDG 1.1.0
d12.x86_64
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
d12.aarch64
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
d13.x86_64
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
d13.aarch64
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
u22.x86_64
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
u22.aarch64
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
u24.x86_64
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
u24.aarch64
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
PIGSTY 1.1.0
Package Version OS ORG SIZE File URL
nominatim_fdw_18 1.1.0 el8.x86_64 pgdg 30.1 KiB nominatim_fdw_18-1.1.0-1PGDG.rhel8.10.x86_64.rpm
nominatim_fdw_18 1.1.0 el8.aarch64 pgdg 29.3 KiB nominatim_fdw_18-1.1.0-1PGDG.rhel8.10.aarch64.rpm
nominatim_fdw_18 1.1.0 el9.x86_64 pgdg 30.5 KiB nominatim_fdw_18-1.1.0-1PGDG.rhel9.7.x86_64.rpm
nominatim_fdw_18 1.1.0 el9.aarch64 pgdg 29.9 KiB nominatim_fdw_18-1.1.0-1PGDG.rhel9.7.aarch64.rpm
nominatim_fdw_18 1.1.0 el10.x86_64 pgdg 30.9 KiB nominatim_fdw_18-1.1.0-1PGDG.rhel10.1.x86_64.rpm
nominatim_fdw_18 1.1.0 el10.aarch64 pgdg 30.5 KiB nominatim_fdw_18-1.1.0-1PGDG.rhel10.1.aarch64.rpm
postgresql-18-nominatim-fdw 1.1.0 d12.x86_64 pigsty 52.7 KiB postgresql-18-nominatim-fdw_1.1.0-1PIGSTY~bookworm_amd64.deb
postgresql-18-nominatim-fdw 1.1.0 d12.aarch64 pigsty 51.9 KiB postgresql-18-nominatim-fdw_1.1.0-1PIGSTY~bookworm_arm64.deb
postgresql-18-nominatim-fdw 1.1.0 d13.x86_64 pigsty 52.6 KiB postgresql-18-nominatim-fdw_1.1.0-1PIGSTY~trixie_amd64.deb
postgresql-18-nominatim-fdw 1.1.0 d13.aarch64 pigsty 51.8 KiB postgresql-18-nominatim-fdw_1.1.0-1PIGSTY~trixie_arm64.deb
postgresql-18-nominatim-fdw 1.1.0 u22.x86_64 pigsty 56.6 KiB postgresql-18-nominatim-fdw_1.1.0-1PIGSTY~jammy_amd64.deb
postgresql-18-nominatim-fdw 1.1.0 u22.aarch64 pigsty 56.0 KiB postgresql-18-nominatim-fdw_1.1.0-1PIGSTY~jammy_arm64.deb
postgresql-18-nominatim-fdw 1.1.0 u24.x86_64 pigsty 54.8 KiB postgresql-18-nominatim-fdw_1.1.0-1PIGSTY~noble_amd64.deb
postgresql-18-nominatim-fdw 1.1.0 u24.aarch64 pigsty 54.7 KiB postgresql-18-nominatim-fdw_1.1.0-1PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
nominatim_fdw_17 1.1.0 el8.x86_64 pgdg 30.1 KiB nominatim_fdw_17-1.1.0-1PGDG.rhel8.10.x86_64.rpm
nominatim_fdw_17 1.1.0 el8.aarch64 pgdg 29.3 KiB nominatim_fdw_17-1.1.0-1PGDG.rhel8.10.aarch64.rpm
nominatim_fdw_17 1.1.0 el9.x86_64 pgdg 30.5 KiB nominatim_fdw_17-1.1.0-1PGDG.rhel9.7.x86_64.rpm
nominatim_fdw_17 1.1.0 el9.aarch64 pgdg 29.9 KiB nominatim_fdw_17-1.1.0-1PGDG.rhel9.7.aarch64.rpm
nominatim_fdw_17 1.1.0 el10.x86_64 pgdg 30.9 KiB nominatim_fdw_17-1.1.0-1PGDG.rhel10.1.x86_64.rpm
nominatim_fdw_17 1.1.0 el10.aarch64 pgdg 30.5 KiB nominatim_fdw_17-1.1.0-1PGDG.rhel10.1.aarch64.rpm
postgresql-17-nominatim-fdw 1.1.0 d12.x86_64 pigsty 52.5 KiB postgresql-17-nominatim-fdw_1.1.0-1PIGSTY~bookworm_amd64.deb
postgresql-17-nominatim-fdw 1.1.0 d12.aarch64 pigsty 51.6 KiB postgresql-17-nominatim-fdw_1.1.0-1PIGSTY~bookworm_arm64.deb
postgresql-17-nominatim-fdw 1.1.0 d13.x86_64 pigsty 52.4 KiB postgresql-17-nominatim-fdw_1.1.0-1PIGSTY~trixie_amd64.deb
postgresql-17-nominatim-fdw 1.1.0 d13.aarch64 pigsty 51.7 KiB postgresql-17-nominatim-fdw_1.1.0-1PIGSTY~trixie_arm64.deb
postgresql-17-nominatim-fdw 1.1.0 u22.x86_64 pigsty 64.3 KiB postgresql-17-nominatim-fdw_1.1.0-1PIGSTY~jammy_amd64.deb
postgresql-17-nominatim-fdw 1.1.0 u22.aarch64 pigsty 64.0 KiB postgresql-17-nominatim-fdw_1.1.0-1PIGSTY~jammy_arm64.deb
postgresql-17-nominatim-fdw 1.1.0 u24.x86_64 pigsty 54.5 KiB postgresql-17-nominatim-fdw_1.1.0-1PIGSTY~noble_amd64.deb
postgresql-17-nominatim-fdw 1.1.0 u24.aarch64 pigsty 54.3 KiB postgresql-17-nominatim-fdw_1.1.0-1PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
nominatim_fdw_16 1.1.0 el8.x86_64 pgdg 30.1 KiB nominatim_fdw_16-1.1.0-1PGDG.rhel8.10.x86_64.rpm
nominatim_fdw_16 1.1.0 el8.aarch64 pgdg 29.3 KiB nominatim_fdw_16-1.1.0-1PGDG.rhel8.10.aarch64.rpm
nominatim_fdw_16 1.1.0 el9.x86_64 pgdg 30.5 KiB nominatim_fdw_16-1.1.0-1PGDG.rhel9.7.x86_64.rpm
nominatim_fdw_16 1.1.0 el9.aarch64 pgdg 29.9 KiB nominatim_fdw_16-1.1.0-1PGDG.rhel9.7.aarch64.rpm
nominatim_fdw_16 1.1.0 el10.x86_64 pgdg 30.9 KiB nominatim_fdw_16-1.1.0-1PGDG.rhel10.1.x86_64.rpm
nominatim_fdw_16 1.1.0 el10.aarch64 pgdg 30.6 KiB nominatim_fdw_16-1.1.0-1PGDG.rhel10.1.aarch64.rpm
postgresql-16-nominatim-fdw 1.1.0 d12.x86_64 pigsty 52.4 KiB postgresql-16-nominatim-fdw_1.1.0-1PIGSTY~bookworm_amd64.deb
postgresql-16-nominatim-fdw 1.1.0 d12.aarch64 pigsty 51.7 KiB postgresql-16-nominatim-fdw_1.1.0-1PIGSTY~bookworm_arm64.deb
postgresql-16-nominatim-fdw 1.1.0 d13.x86_64 pigsty 52.4 KiB postgresql-16-nominatim-fdw_1.1.0-1PIGSTY~trixie_amd64.deb
postgresql-16-nominatim-fdw 1.1.0 d13.aarch64 pigsty 51.9 KiB postgresql-16-nominatim-fdw_1.1.0-1PIGSTY~trixie_arm64.deb
postgresql-16-nominatim-fdw 1.1.0 u22.x86_64 pigsty 64.1 KiB postgresql-16-nominatim-fdw_1.1.0-1PIGSTY~jammy_amd64.deb
postgresql-16-nominatim-fdw 1.1.0 u22.aarch64 pigsty 63.8 KiB postgresql-16-nominatim-fdw_1.1.0-1PIGSTY~jammy_arm64.deb
postgresql-16-nominatim-fdw 1.1.0 u24.x86_64 pigsty 54.5 KiB postgresql-16-nominatim-fdw_1.1.0-1PIGSTY~noble_amd64.deb
postgresql-16-nominatim-fdw 1.1.0 u24.aarch64 pigsty 54.3 KiB postgresql-16-nominatim-fdw_1.1.0-1PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
nominatim_fdw_15 1.1.0 el8.x86_64 pgdg 30.1 KiB nominatim_fdw_15-1.1.0-1PGDG.rhel8.10.x86_64.rpm
nominatim_fdw_15 1.1.0 el8.aarch64 pgdg 29.3 KiB nominatim_fdw_15-1.1.0-1PGDG.rhel8.10.aarch64.rpm
nominatim_fdw_15 1.1.0 el9.x86_64 pgdg 30.5 KiB nominatim_fdw_15-1.1.0-1PGDG.rhel9.7.x86_64.rpm
nominatim_fdw_15 1.1.0 el9.aarch64 pgdg 29.9 KiB nominatim_fdw_15-1.1.0-1PGDG.rhel9.7.aarch64.rpm
nominatim_fdw_15 1.1.0 el10.x86_64 pgdg 30.9 KiB nominatim_fdw_15-1.1.0-1PGDG.rhel10.1.x86_64.rpm
nominatim_fdw_15 1.1.0 el10.aarch64 pgdg 30.5 KiB nominatim_fdw_15-1.1.0-1PGDG.rhel10.1.aarch64.rpm
postgresql-15-nominatim-fdw 1.1.0 d12.x86_64 pigsty 52.4 KiB postgresql-15-nominatim-fdw_1.1.0-1PIGSTY~bookworm_amd64.deb
postgresql-15-nominatim-fdw 1.1.0 d12.aarch64 pigsty 51.8 KiB postgresql-15-nominatim-fdw_1.1.0-1PIGSTY~bookworm_arm64.deb
postgresql-15-nominatim-fdw 1.1.0 d13.x86_64 pigsty 52.4 KiB postgresql-15-nominatim-fdw_1.1.0-1PIGSTY~trixie_amd64.deb
postgresql-15-nominatim-fdw 1.1.0 d13.aarch64 pigsty 51.8 KiB postgresql-15-nominatim-fdw_1.1.0-1PIGSTY~trixie_arm64.deb
postgresql-15-nominatim-fdw 1.1.0 u22.x86_64 pigsty 64.1 KiB postgresql-15-nominatim-fdw_1.1.0-1PIGSTY~jammy_amd64.deb
postgresql-15-nominatim-fdw 1.1.0 u22.aarch64 pigsty 63.8 KiB postgresql-15-nominatim-fdw_1.1.0-1PIGSTY~jammy_arm64.deb
postgresql-15-nominatim-fdw 1.1.0 u24.x86_64 pigsty 54.5 KiB postgresql-15-nominatim-fdw_1.1.0-1PIGSTY~noble_amd64.deb
postgresql-15-nominatim-fdw 1.1.0 u24.aarch64 pigsty 54.4 KiB postgresql-15-nominatim-fdw_1.1.0-1PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
nominatim_fdw_14 1.1.0 el8.x86_64 pgdg 30.1 KiB nominatim_fdw_14-1.1.0-1PGDG.rhel8.10.x86_64.rpm
nominatim_fdw_14 1.1.0 el8.aarch64 pgdg 29.2 KiB nominatim_fdw_14-1.1.0-1PGDG.rhel8.10.aarch64.rpm
nominatim_fdw_14 1.1.0 el9.x86_64 pgdg 30.5 KiB nominatim_fdw_14-1.1.0-1PGDG.rhel9.7.x86_64.rpm
nominatim_fdw_14 1.1.0 el9.aarch64 pgdg 29.9 KiB nominatim_fdw_14-1.1.0-1PGDG.rhel9.7.aarch64.rpm
nominatim_fdw_14 1.1.0 el10.x86_64 pgdg 30.9 KiB nominatim_fdw_14-1.1.0-1PGDG.rhel10.1.x86_64.rpm
nominatim_fdw_14 1.1.0 el10.aarch64 pgdg 30.5 KiB nominatim_fdw_14-1.1.0-1PGDG.rhel10.1.aarch64.rpm
postgresql-14-nominatim-fdw 1.1.0 d12.x86_64 pigsty 52.4 KiB postgresql-14-nominatim-fdw_1.1.0-1PIGSTY~bookworm_amd64.deb
postgresql-14-nominatim-fdw 1.1.0 d12.aarch64 pigsty 51.7 KiB postgresql-14-nominatim-fdw_1.1.0-1PIGSTY~bookworm_arm64.deb
postgresql-14-nominatim-fdw 1.1.0 d13.x86_64 pigsty 52.4 KiB postgresql-14-nominatim-fdw_1.1.0-1PIGSTY~trixie_amd64.deb
postgresql-14-nominatim-fdw 1.1.0 d13.aarch64 pigsty 51.8 KiB postgresql-14-nominatim-fdw_1.1.0-1PIGSTY~trixie_arm64.deb
postgresql-14-nominatim-fdw 1.1.0 u22.x86_64 pigsty 64.0 KiB postgresql-14-nominatim-fdw_1.1.0-1PIGSTY~jammy_amd64.deb
postgresql-14-nominatim-fdw 1.1.0 u22.aarch64 pigsty 63.6 KiB postgresql-14-nominatim-fdw_1.1.0-1PIGSTY~jammy_arm64.deb
postgresql-14-nominatim-fdw 1.1.0 u24.x86_64 pigsty 54.5 KiB postgresql-14-nominatim-fdw_1.1.0-1PIGSTY~noble_amd64.deb
postgresql-14-nominatim-fdw 1.1.0 u24.aarch64 pigsty 54.3 KiB postgresql-14-nominatim-fdw_1.1.0-1PIGSTY~noble_arm64.deb

Source

Install

Make sure PGDG repo available:

pig repo add pgdg -u    # add pgdg repo and update cache

Install this extension with pig:

pig install nominatim_fdw;		# install via package name, for the active PG version

pig install nominatim_fdw -v 18;   # install for PG 18
pig install nominatim_fdw -v 17;   # install for PG 17
pig install nominatim_fdw -v 16;   # install for PG 16
pig install nominatim_fdw -v 15;   # install for PG 15
pig install nominatim_fdw -v 14;   # install for PG 14

Create this extension with:

CREATE EXTENSION nominatim_fdw;

Usage

nominatim_fdw: Nominatim Foreign Data Wrapper for PostgreSQL

This FDW provides access to Nominatim geocoding services directly from PostgreSQL using SQL functions rather than traditional foreign tables.

Create Server

CREATE EXTENSION nominatim_fdw;

CREATE SERVER osm FOREIGN DATA WRAPPER nominatim_fdw
  OPTIONS (url 'https://nominatim.openstreetmap.org');

Server Options: url (required, Nominatim endpoint URL), http_proxy, proxy_user, proxy_user_password, connect_timeout (default 300 seconds), max_connect_retry (default 3), max_request_redirect (0 = unlimited).

Geocoding (Address to Coordinates)

Structured search:

SELECT osm_id, ref, lon, lat, boundingbox
FROM nominatim_search(
  server_name => 'osm',
  street => 'Neubrueckenstrasse 63',
  city => 'Muenster',
  country => 'Germany'
);

Free-form search:

SELECT osm_id, display_name, lon, lat
FROM nominatim_search(
  server_name => 'osm',
  q => '1600 Pennsylvania Avenue, Washington DC'
);

Parameters: q (free-form query), street, city, county, state, country, postalcode, amenity, limit (default 10), addressdetails, extratags, namedetails.

Reverse Geocoding (Coordinates to Address)

SELECT osm_id, display_name, boundingbox
FROM nominatim_reverse(
  server_name => 'osm',
  lon => -77.0365,
  lat => 38.8977,
  zoom => 18,
  addressdetails => true
);

Parameters: lon, lat (required), zoom (default 18), addressdetails, extratags, namedetails, layer.

OSM Object Lookup

SELECT osm_id, display_name
FROM nominatim_lookup(
  server_name => 'osm',
  osm_ids => 'W121736959,R123456'
);

Parameters: osm_ids (comma-separated list of OSM IDs with type prefix: N=node, W=way, R=relation), addressdetails, extratags, namedetails.

Version Check

SELECT nominatim_fdw_version();
Last updated on