nominatim_fdw
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
nominatim_fdw | 1.1.0 | FDW | MIT | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 8680 | nominatim_fdw | No | Yes | No | Yes | No | Yes | - |
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PGDG | 1.1.0 | 1817161514 | nominatim_fdw | - |
| RPM | PGDG | 1.1.0 | 1817161514 | nominatim_fdw_$v | - |
| DEB | PIGSTY | 1.1.0 | 1817161514 | postgresql-$v-nominatim-fdw | - |
Build
You can build the DEB packages for nominatim_fdw using pig build:
pig build pkg nominatim_fdw # build DEB packages
Install
You can install nominatim_fdw directly. First, make sure the PGDG repository is added and enabled:
pig repo add pgdg -u # Add PGDG repo and update cache
Install the extension using pig or apt/yum/dnf:
pig install nominatim_fdw; # Install for current active PG version
pig ext install -y nominatim_fdw -v 18 # PG 18
pig ext install -y nominatim_fdw -v 17 # PG 17
pig ext install -y nominatim_fdw -v 16 # PG 16
pig ext install -y nominatim_fdw -v 15 # PG 15
pig ext install -y nominatim_fdw -v 14 # PG 14
dnf install -y nominatim_fdw_18 # PG 18
dnf install -y nominatim_fdw_17 # PG 17
dnf install -y nominatim_fdw_16 # PG 16
dnf install -y nominatim_fdw_15 # PG 15
dnf install -y nominatim_fdw_14 # PG 14
apt install -y postgresql-18-nominatim-fdw # PG 18
apt install -y postgresql-17-nominatim-fdw # PG 17
apt install -y postgresql-16-nominatim-fdw # PG 16
apt install -y postgresql-15-nominatim-fdw # PG 15
apt install -y postgresql-14-nominatim-fdw # PG 14
Create Extension:
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();
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.