How to Install Nominatim on Windows 10

Nominatim is a free, open-source tool that helps in geocoding and reverse geocoding. It is used to convert addresses into geographic coordinates (latitude and longitude) and vice versa. In this tutorial, we will show you how to install Nominatim on Windows 10.

Step 1: Install PostgreSQL

Nominatim requires PostgreSQL as a backend database. Follow the steps mentioned below to install PostgreSQL on your Windows 10 machine.

  1. Download the latest version of PostgreSQL from the official website.

  2. Run the installer and follow the onscreen instructions to install PostgreSQL.

  3. During the installation process, you will be prompted to select a password for the PostgreSQL superuser account. Make sure to remember this password.

  4. After the installation is complete, open the pgAdmin application.

Step 2: Install dependencies

Nominatim has several dependencies that need to be installed before installing it. Follow the steps mentioned below to install the dependencies.

  1. Open the Command Prompt application with administrator privileges.

  2. Run the following command to install the dependencies.

choco install -y automake libtool pkg-config cmake gcc magick imagemagick
  1. Once the installation is complete, close the Command Prompt application.

Step 3: Download and install Nominatim

  1. Open the Command Prompt application with administrator privileges.

  2. Run the following command to clone the Nominatim repository.

git clone --recursive https://github.com/openstreetmap/Nominatim.git
  1. Change the directory to the Nominatim repository that you have just cloned.
cd Nominatim
  1. Run the following command to build and install Nominatim.
./configure && make
  1. During the build process, you may encounter several warnings and errors. Make sure to resolve them before proceeding.

  2. Once the build is complete, run the following command to install Nominatim.

sudo make install
  1. After the installation is complete, run the following command to create a Nominatim user.
sudo useradd -m -p $(openssl passwd -1 nominatim) nominatim
  1. Now, run the following command to initialize the database.
sudo ./utils/setup.php --create-website /nominatim
  1. The above command may take several minutes to execute. After it is complete, run the following command to download the data for your desired country.
sudo ./utils/setup.php --import-data <country-code> --osm-file <path-to-your-osm-file>
  1. You can change the permissions of the Nominatim folder to your user account.
sudo chown -R <your-username>:<your-group> /srv/nominatim
  1. Finally, run the following command to start the Nominatim service.
sudo systemctl start nominatim.service

Conclusion

In this tutorial, we have shown you how to install Nominatim on Windows 10. You can now use Nominatim to convert addresses into geographic coordinates and vice versa.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!