NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi - I want to use Nominatim's reverse geocoder to get a lat/lon for this node: 269908858 (Mérida, Yucatán, Mexico)

Here's the node on OSM:

The node has lat/lon data according the XML provided by OSM API:

However, when I pass it to Nominatim it returns an error:

(the code format tag on this board is subbing "&" for "&" so correct this manually before opening)

Error message:

Output:{"error":"Unable to geocode"}

What's missing from this node that causes this error, and what can I do about it?

Thanks loads for the help!

asked 21 Feb '18, 10:37

case_the_joint's gravatar image

accept rate: 0%

I think you want to use the /lookup method since you're not supplying a lat,lon in the search.

When you do a forward search you'll note that Nominatim uses the city relation (, not the city node (

What's missing from this node

Nothing. The relation has a Node Mérida (269908858) as admin_centre set. For Nominatim that means both describe the same place. Nominatim chooses to ignore the node in this case.

permanent link

answered 21 Feb '18, 11:06

mtmail's gravatar image

accept rate: 27%

edited 21 Feb '18, 13:27


Hi @mtmail thanks so much for the quick response and advice. I forget why I used the reverse and not the lookup. For completeness' sake, the lookup has a slightly different syntax than you suggest:

So if I wanted to get a set of coordinates for the Merida node itself, and Nominatim won't return that, then is the best substitute I can get from OSM the centre point of the Merida relation (5961522)?

(21 Feb '18, 11:28) case_the_joint

You're right, thanks, I updated the URL in my answer. For a relation result Nominatim tries to use the linked admin_center or admin_label roles (nodes) to set the center. So it knows about those nodes just merges the information. For example for "Hamburg" (the state, which is split into two parts it returns the center point of the admin_center not the geographic center because that wouldn't even be inside the relation/multi-polygon.

(21 Feb '18, 13:37) mtmail

Thanks for the clarification! You've been very helpful, thank you.

(21 Feb '18, 15:58) case_the_joint

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 21 Feb '18, 10:37

question was seen: 5,295 times

last updated: 21 Feb '18, 15:58

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum