Tutorial: How to Install Nominatim on Windows 11
Nominatim is a powerful and free geocoding and reverse geocoding software that allows developers and data analysts to convert addresses into geographic coordinates and vice versa. It is widely used by organizations and individuals seeking to create location-based applications and analysis.
In this tutorial, we will guide you through the process of installing Nominatim on your Windows 11 computer.
Prerequisites
Before you begin, make sure you have the following prerequisites installed on your computer:
- Git - you can download it from https://git-scm.com/download/win
- PostgreSQL - you can download it from https://www.postgresql.org/download/
- PostGIS - you can download it from https://postgis.net/windows_downloads/
Step 1: Cloning the Nominatim Repository
Open the Git Bash command prompt by clicking on the Start menu and searching for "Git Bash".
In the Git Bash window, navigate to the directory where you want to clone the Nominatim repository. You can do this by using the
cdcommand.
cd C:\nominatim
- Clone the Nominatim repository by running the following command.
git clone --recursive https://github.com/osm-search/Nominatim.git
Step 2: Installing Dependencies
Open the PostgreSQL command prompt by clicking on the Start menu and searching for "PostgreSQL".
In the PostgreSQL command prompt, create a new database named "nominatim" by running this command:
CREATE DATABASE nominatim;
- Run the following commands to install the dependencies required by Nominatim.
cd Nominatim
./utils/setup.php --setup-database
./utils/setup.php --create-functions --enable-diff-updates
Step 3: Building and Installing Nominatim
- Run the following command to download and install the Nominatim data.
./utils/setup.php --import-osmosis-all
- Build Nominatim by running the following command.
./utils/setup.php --build --no-npi
- After the building process is complete, install Nominatim by running the following command.
./utils/setup.php --create-website --create-api-keys
Step 4: Testing Nominatim
- Start the Nominatim web server by running the following command.
./utils/start.php
Open your web browser and go to http://localhost/nominatim/. You should see the Nominatim search interface.
Enter an address or a place name in the search box and click "Search". Nominatim should return the corresponding geographic coordinates and other related information.
Congratulations, you have successfully installed Nominatim on your Windows 11 computer! Feel free to explore its features and integrate it into your projects.