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:

area[name="Česko"];(node[information="guidepost"](area););out;

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

gorn
528182435
accept rate: 12%

edited 19 Aug '14, 10:55

SimonPoole's gravatar image

SimonPoole ♦
37.6k13282597


Please have a look at http://overpass-turbo.eu/s/4EF

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
6.3k35685
accept rate: 35%

edited 20 Aug '14, 18:16

1

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.

http://overpass-turbo.eu/s/4Fo

(20 Aug '14, 23:16) mmd
1

Execllent idea!

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

http://overpass-turbo.eu/s/4FJ

(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

stephan75
12.5k453209
accept rate: 6%

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×340
×71
×30

question asked: 19 Aug '14, 01:55

question was seen: 5,425 times

last updated: 21 Aug '14, 05:03

powered by OSQA