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

I have a overpass query which returns lot of nodes. I would like to know whether there is a way to add reverse geocoding information to the resulting data set. Details of my case are not that important, but just for completness:


in fact i do not need full reverse geocoding info for nodes, I only need relation of certain administrative level, so if this is possible to add into the result set, it would be great.

PS: I know that I can read the result set and then reverse geocode each individual node, but it seems very inefficient to me.

asked 19 Aug '14, 01:55

gorn's gravatar image

accept rate: 11%

edited 19 Aug '14, 10:55

SimonPoole's gravatar image

SimonPoole ♦

Please have a look at

The foreach loop enables you to get the areas a node lies in right after each node.

permanent link

answered 20 Aug '14, 08:04

Roland%20Olbricht's gravatar image

Roland Olbricht
accept rate: 36%

edited 20 Aug '14, 18:16


To avoid retrieving the same area details many times, you could just return the area id in a first API call and retrieve the missing area details in a second query call for each distinct area id returned by the first query.

After the signpost node, you would just get the following detail from the first query:

<area id="3600435511"/> <area id="3600442466"/>

In a second query you could fetch the more details for those area ids: (area(3600435511);area(3600442466););out;

This could save some bandwidth on your end.

(20 Aug '14, 23:16) mmd

Execllent idea!

On top of this, you could even avoid to ask for a list of ids:

(21 Aug '14, 05:03) Roland Olbricht

Have a look for "batch geocoding" or "batch reverse geocoder" or similar on this FAQ site.

Or have a closer look at the OSM wiki about Search engines ... maybe there is a solution for your aim.

permanent link

answered 19 Aug '14, 16:09

stephan75's gravatar image

accept rate: 6%

For anyone arriving from a Google search:

.Posts is_in;
out geom;
.Posts out center;
permanent link

answered 23 Jul '22, 23:21

DaveF's gravatar image

accept rate: 16%

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: 19 Aug '14, 01:55

question was seen: 10,469 times

last updated: 23 Jul '22, 23:21

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