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

I am wanting to return the Continent for a reverse geocode, I have used the documentation links as an example but I seem to be getting everything but the continent returned.

http://nominatim.openstreetmap.org/search/Unter%20den%20Linden%201%20Berlin?format=json&addressdetails=1&limit=1&polygon_svg=1

http://nominatim.openstreetmap.org/reverse?format=xml&lat=52.5487429714954&lon=-1.81602098644987&zoom=18&addressdetails=1

Am I doing something wrong? missing parameter?

Any help greatly appreciated.

Regards,

asked 04 May '16, 12:11

john5092563's gravatar image

john5092563
26112
accept rate: 0%


Nominatim imports the 7 continents, but only as center point. So you can search for "Europe" only and get a result back.

That means for example Europe http://www.openstreetmap.org/node/25871341 is treated as a child of Germany, not its parent.

What is the usecase you need continents for? I wanted to add those to https://geocoder.opencagedata.com/ because we use multiple geocoders and some return a continent while others (like Nominatim) don't and that's inconsistent. I would probably use a fixed country=>continent mapping though which might be incorrect for cities which are on two continents (Istanbul).

permanent link

answered 04 May '16, 13:29

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

I guess the actual reason is that OSM has all its continents just defined as nodes, not as ways / boundary relations. I wonder what the reason for this is.

(04 May '16, 13:39) scai ♦

I think the general avoidance of super-national borders, be it continents or trade areas (European Union, NAFTA). In Taginfo all admin_level 0 or 1 I see are errors. admin_level=2 are countries.

(04 May '16, 13:57) mtmail

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:

×85

question asked: 04 May '16, 12:11

question was seen: 2,349 times

last updated: 04 May '16, 13:57

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