Geocoding vs Reverse Geocoding: How Addresses Become Coordinates (and Back)
What geocoding and reverse geocoding actually do, how match quality levels work (rooftop vs interpolated), why results differ between providers, and what accuracy you can expect.
Type an address into a map and a pin appears. Click a point on a satellite photo and the map names the street. These two translations — address → coordinates and coordinates → address — are called geocoding and reverse geocoding. They sit behind almost every location feature you use, and they are messier than they look.
I build drone ground control software, and before planning drone mapping missions I measured distances and areas of the site in advance. Whenever a location starts as an address rather than a measured point, the geocoded pin is best treated as a starting estimate, not a surveyed point. This post explains why.
Geocoding: Address → Coordinates
A geocoder parses free-form text into structured parts (house number, street, city, postal code, country), matches them against a reference database, and returns coordinates. The interesting part is how good the match is. Geocoders resolve an address at different levels of detail:
| Match level | How the position is determined | What it means in practice |
|---|---|---|
| Building / rooftop | The building outline or an address point is in the database | Pin lands on the actual building |
| Interpolated | Position estimated along a street from a house-number range | Pin is on the right street, somewhere near the right number |
| Street | Only the street matched | Pin drops somewhere on the street |
| Locality / postal code | Only the city or postal code matched | Pin sits at the center of a whole area |
How far off each level can be depends on the area — a city-level match in a large municipality can be kilometres from the real address. The level matters more than the decimal places.
What interpolation actually does
Many street segments don't have every building mapped. Instead, the data says something like "house numbers 1 to 99 run along this line." In OpenStreetMap this is the addr:interpolation tag, whose values say whether all, only even, only odd, or alphabetic numbers exist in the range (OSM Wiki: addr:interpolation). A geocoder asked for number 50 then places the pin roughly halfway along that line.
That works when houses are evenly spaced. When one end of the block is a big lot and the other is packed with small houses, the pin lands on the right street but in front of the wrong building. If you call a geocoding API in code, check the returned type or rank, not just the latitude and longitude.
Reverse Geocoding: Coordinates → Address
The reverse direction doesn't compute an address mathematically. Nominatim's documentation says it plainly: the reverse API "works by finding the closest suitable OSM object and returning its address information," and in dense city areas that closest object "may belong to a completely different street" (Nominatim Reverse API docs). The same docs note that small, unnamed paths aren't in the search index at all, so they can never be returned.
In practice:
- A point on a mapped building usually returns that building's address.
- A point in a park, lake, field, or highway median returns the nearest suitable feature, which can be far away and semantically wrong.
- Near a boundary, moving a few metres can change the returned district, postal code, or even city.
So geocoding and reverse geocoding are not inverses. Geocode an address, reverse-geocode the result, and you may get a different address — whatever feature is closest to an interpolated point.
A Worked Example: One Address, Both Directions
To show what a real response looks like, I sent two requests to the public Nominatim server (the same service this site uses), with a descriptive User-Agent and a pause between them.
Step 1 — geocode 1600 Pennsylvania Avenue NW, Washington, DC:
https://nominatim.openstreetmap.org/search?q=1600+Pennsylvania+Avenue+NW,+Washington,+DC&format=jsonv2&addressdetails=1&limit=1
Key fields from the response:
"lat": "38.8976387", "lon": "-77.0365525"
"osm_type": "relation", "category": "office", "type": "government"
"place_rank": 30, "addresstype": "office", "name": "White House"
"display_name": "White House, 1600, Pennsylvania Avenue Northwest, Ward 2,
Washington, District of Columbia, 20500, United States"
"boundingbox": ["38.8974904", "38.8977959", "-77.0368541", "-77.0362509"]
place_rank: 30 is Nominatim's most detailed rank — a specific object rather than a street or city — and the match is a mapped building, not an interpolated range. The bounding box is about 34 m north–south by 52 m east–west (computed from the box corners with a spherical Earth), which tells you the returned point is the middle of a building footprint, not the front door.
Step 2 — reverse geocode the result, rounded to five decimals (38.89764, -77.03655):
https://nominatim.openstreetmap.org/reverse?lat=38.89764&lon=-77.03655&format=jsonv2&addressdetails=1
The response returned the same object (same place_id 347426922 and osm_id 19761182) with the identical display_name. The rounded input was about 0.26 m from the original point, so the round trip came back unchanged.
This is the good case: a famous, well-mapped building. With a rural address or a new development where house numbers are sparse in OpenStreetMap, the reverse step can come back with a neighbouring number or just a street name.
You can repeat the experiment yourself with the address to coordinates and coordinates to address tools.
Why Providers Disagree
Geocode the same address with Google, Nominatim, and a national address service, and you will often get noticeably different points. The reasons:
- Reference data. Commercial providers combine licensed and self-collected data; Nominatim uses OpenStreetMap, which is edited by volunteers; national services use official registries. Coverage and freshness vary by country and even by neighbourhood.
- Where the point goes. One provider returns the centre of the building outline, another an entrance or address point, another a spot on the street in front. All three can be "correct" for the same address.
- Parsing and language. A landmark name, a street address, and a query in the local script may resolve differently depending on how the parser handles each language and address format.
- Licensing. OpenStreetMap data is provided under the ODbL, which requires attribution and share-alike (Nominatim Usage Policy). Commercial geocoders have their own terms, often limiting how long you may store results or which maps you may show them on — read the terms before caching or redistributing.
Rate Limits and Fair Use
The public Nominatim server runs on donated hardware, and the OpenStreetMap Foundation's usage policy is short and strict (Nominatim Usage Policy):
- An absolute maximum of 1 request per second, counted across all users of your app or website combined.
- A valid User-Agent or HTTP Referer that identifies your application — default library User-Agents are not accepted.
- Visible attribution and respect for the ODbL.
- Bulk geocoding is discouraged. Small one-time jobs may be OK if they run single-threaded on one machine; scripts that run longer than a day or on a schedule are limited to 4 requests per minute; and results must be cached, because clients repeatedly sending the same query may be blocked.
How This Site Does It
The tools on gps-pins.org send searches and map clicks from our server to the public Nominatim API with an identifying User-Agent. To stay within the policy, identical queries are cached on the server for a day, and reverse-geocoding coordinates are rounded to five decimal places (about 1.1 m of latitude) so nearby clicks can share a cached answer.
Privacy Note
Geocoding is not a purely local calculation. Whatever you type — a home address, a client's site — is sent to a geocoding service to be matched, and coordinates you reverse-geocode are sent the same way. On this site, those requests go from our server to Nominatim rather than directly from your browser. If an address is sensitive, search for a nearby public street instead and move the pin by hand. Our privacy policy describes what the site itself collects.
Practical Tips
- Give context. Include the city and country whenever you know them.
- Check the match level. A street-level or city-level match with six decimal places is still a rough estimate. The same trap exists with GPS readings.
- Validate both ways. Geocode, reverse-geocode, and compare; a big disagreement flags a weak match.
- Verify on imagery. For anything that matters — a drone launch point, a site boundary — look at the pin on satellite imagery and move it to the real spot. When centimetre-level positions mattered in my own mapping work, I relied on RTK/PPK-corrected GNSS, not on an address lookup.
FAQ
Is a geocoded coordinate accurate enough for navigation or surveying? For finding a building, usually yes if the match is building-level. For surveying or flight planning, no — confirm on imagery or with measured positions.
Why did reverse geocoding give me a different house number than the one I searched? Because reverse geocoding returns the nearest suitable mapped object. If the original match was interpolated, or a neighbouring building is mapped and yours isn't, the nearest object can carry a different number.
Can I use the public Nominatim server to geocode a spreadsheet of addresses? Only for small one-time jobs that follow the bulk rules above. Regular or large jobs should use a self-hosted instance or a commercial service.
Try Both Directions
Our GPS coordinates finder does both live: search an address or place to geocode it, or click anywhere on the map to reverse-geocode the point, with coordinates shown in DD, DMS, and DDM at the same time. For dedicated pages, use address to coordinates and coordinates to address. For location based on an IP address instead of a street address, see IP geolocation.
Related Posts
How to Use GPS Coordinates: Opening Them in Map Apps and Converting to Addresses
Learn how to open GPS coordinates in Google Maps, Apple Maps, and Kakao Maps, and how reverse geocoding turns latitude and longitude into a readable street address.
MGRS vs UTM: How the Military Grid Reference System Builds on UTM
MGRS and UTM share the same math but read differently. Learn how MGRS compresses UTM coordinates into grid references like 4QFJ 12345 67890, and when each system is the right choice.
How to Calculate the Distance Between Two Coordinates (Haversine vs Vincenty, With Worked Examples)
Calculate the distance between two GPS coordinates with the haversine formula, see how far it drifts from the exact WGS84 ellipsoid answer, and avoid the most common mistakes. Includes a Seoul–Busan worked example.