From Addresses to Coordinates: Geocoding with NextGIS Toolbox

A spreadsheet with addresses is almost a spatial dataset, it may contain offices, customers, survey locations, infrastructure objects, schools, shops, or any other places. But without coordinates, you still cannot put those records on a map.

Geocoding closes this gap by converting human-readable addresses and place names into geographic coordinates.

NextGIS Toolbox provides two tools for common geocoding workflows:

  • Geocode a table processes a CSV file containing addresses and adds latitude and longitude to every successfully geocoded record.
  • Geocode with Nominatim resolves an individual address or place name using OpenStreetMap Nominatim and returns its coordinates and bounding box.

The first turns an existing table into a dataset ready for mapping. The second is particularly useful when you need to locate a place or define a geographic area for another processing task.

Key Takeaways

  • Turn a regular CSV address list into a geocoded table without writing a script.
  • Use the OpenStreetMap Nominatim geocoder or, for table geocoding, another supported provider with your own API key.
  • Preserve all original CSV attributes while adding latitude and longitude.
  • Convert a city, address, or place name into a geospatial data suitable as input for other Toolbox tools.
  • Run both workflows from the browser or automate them through the NextGIS Toolbox API and Python SDK.

Geocoding an Address Table

Consider a typical dataset maintained outside GIS:

name type address
The Bright Lightsoffice Bulevar oslobođenja 30, Novi Sad, Serbia
The GardenwarehouseSvetosavska 6, Nis, Serbia
X109 GroupofficeTrg republike 5, Beograd, Serbia


This is useful business data, but GIS software does not know where these records belong geographically. The Geocode a table tool takes a CSV file like this, sends the values from the selected address field to a geocoder, and returns another CSV containing the original attributes plus latitude and longitude.

The workflow requires four parameters.

1. Source file

Upload a CSV file containing your data.

The first row must contain field names, and the file should use UTF-8 encoding.

2. Geocoder

Select the geocoding provider.

OpenStreetMap Nominatim is available without an API key. Other available geocoders require the corresponding service credentials and are subject to their providers’ licensing and usage conditions.

3. Address field

Select the CSV column containing the address to geocode. For example, address

Ideally, the values should contain enough information to identify a location unambiguously: Marienplatz 1, München, Germany will generally be more useful to a geocoder than Marienplatz 1

4. API key

For Nominatim, leave this field empty.

When using another supported geocoder, provide an API key for that service.

Result

Run the tool, and the resulting CSV contains all the source data plus two additional columns with geographic coordinates. Also, a GeoPackage is automatically created in addition to the CSV file.

The result can then be opened in QGIS, imported into a database, processed with Python, or used in another GIS workflow.

Where Table Geocoding Is Useful

Address lists appear in almost every industry:

  • Customer and partner locations. Map CRM exports or sales territories.
  • Asset inventories. Convert address-based registers of buildings and equipment into GIS layers.
  • Education and healthcare. Map schools, clinics, pharmacies, or other facilities.
  • Field surveys. Prepare a spatial dataset from locations originally collected as addresses.
  • Urban studies. Locate businesses, services, cultural objects, or public infrastructure.
  • Logistics. Map warehouses, delivery destinations, and service points.
  • Research. Spatialize tabular records assembled from reports, archives, or external databases.

The whole table can be processed in one run!

Geocoding a Single Place with Nominatim

Sometimes you do not have a table at all, you just know the place you are interested in. For this case, NextGIS Toolbox provides Geocode with Nominatim.

The tool sends the query to the OpenStreetMap Nominatim API and returns the matched location together with its geographic coordinates and bounding box.

There are two inputs.

1. Address / Place Name

Enter a human-readable place name or address. For example: Buxoro shahri

2. Buffer

Optionally expand the returned bounding box by a specified distance in kilometers. This is useful when a point address should become a practical working area. For example, geocoding an address with a 5 km buffer gives you a geographic extent covering the surroundings of that address.

Result

The Nominatim tool returns several outputs:

  • a JSON bounding box containing west, south, east, and north;
  • a human-readable summary of the geocoding result;
  • a full JSON manifest containing coordinates, bounding box, area, and additional metadata.

The bounding box output is especially useful! This is the same representation commonly used by other geoprocessing and data-download tools. That means geocoding can become the first step of a larger Toolbox workflow.

Which Tool Should You Use?

Geocode a tableGeocode with Nominatim
InputCSV with many addressesOne address or place name
Main purposeAdd coordinates to recordsResolve a location and its extent
OutputCSV with latitude and longitude; GeoPackageCoordinates, bounding box, JSON metadata
GeocoderNominatim, Yandex or GoogleOpenStreetMap Nominatim
API keyNot requiredNominatim Not required
Best forConverting addresses into GIS-ready datasetsFinding an area for another spatial operation

Use Geocode a table when the addresses are themselves your dataset.

Use Geocode with Nominatim when an address or place name describes where another operation should happen.

Run Geocoding from Python

Like other NextGIS Toolbox tools, both geocoding operations are also available programmatically.

Every tool page includes a ready-to-use example for the NextGIS Toolbox SDK.

Install it with pip install toolbox-sdk

For example, Geocode with Nominatim can be invoked through the SDK using the tool identifier:

Python

from toolbox_sdk import ToolboxClient 
# Initialize the Toolbox client 
toolbox = ToolboxClient("YOUR_TOOLBOX_API_KEY") 
# Select the tool 
nominatim_geocode = toolbox.tool("nominatim_geocode") 
# Geocode a place and expand its bounding box by 5 km 
result = nominatim_geocode( { 
             "query": "Novi Sad, Serbia",
             "buffer_km": 5,
         })
# Inspect all returned outputs
print(result.outputs)
  

and Geocode a table through:

Python

from toolbox_sdk import ToolboxClient 
# Initialize the Toolbox client
toolbox = ToolboxClient("YOUR_TOOLBOX_API_KEY") 
# Select the tool 
geocodetable = toolbox.tool("geocodetable") 
# Run it synchronously 
result = geocodetable( { 
             "table": toolbox.upload_file("offices.csv"),
             "geocoder_vendor": "nominatim",
             "addr_field": "address",
             "api_key": "", 
         })
# Download the resulting CSV into the current directory
toolbox.download_results(result, ".")
  

This makes geocoding easy to include in scripts and larger processing pipelines.

For example, an automated workflow could Export addresses from a database -> Geocode the CSV -> Create spatial features -> Run spatial analysis -> Publish the result

Or another application might start only with a user-supplied place: user enters “Novi Sad, Serbia” -> Geocode with Nominatim -> Get bounding box -> Request data for this area -> Run analysis

These tools are useful both as browser-based utilities and as building blocks for reproducible geospatial processing.

Get started

Both tools are free. All you need to do is create an account at my.nextgis.com.

Comments are closed.