# Country code NL + stepped search algorithm

 0 Hi, I'm new here so I hope this question is to the right audience. I'm developing software that wants to use the nominatim API for geocoding. We have all the technicalities solved, and get satisfactory results as long as the entered address data is correct. But of course there are situations where the address data we send to nominatim is incorrect. We now have an algorithm as follows: 1) try to get the geocode for street + house number, city, (state,) country code (we add state only for US addresses) 2) if 1 fails, try to get the geocode for city, (state,) country code 3) if 2 fails, try to get the geocode for (state,) country code Unfortunately I can only use country codes, no country names. Now I have two questions: When we get to step 3 for The Netherlands (code NL), (http://nominatim.openstreetmap.org/search?q=,,,NL&format=xml) we get this geocode (lat="49.4026367037741" lon="-0.234108765413479") which is in the Atlantic next to France. This looks like an OpenStreetMap data problem. Can this be resolved somehow? The 1-2-3 logic above perhaps is way to simple. On the other hand, trying to find a geocode on increasing less-precise level until you succeed sounds like a generic solution. Isn't such a feature available standard in nominatim? asked 15 Sep '11, 10:23 msol 1●3●3●4 accept rate: 0%

 1 If you can accept solutions next to Nominatim's geocoding, have a look at Navit or OsmAnd (both opensourced) how they can find their addresses and how they output if some locations fail. answered 15 Sep '11, 18:17 stephan75 12.5k●4●54●209 accept rate: 6%
 4 Regarding the Netherlands: Nominatim is giving the location based on relation 47796. This includes the 'mainland' part (in Europe), as well as several islands in the Caribbean. These are all part of the country of the Netherlands, so it appears the OSM data is actually correct. But it seems Nominatim is calculating the centre point of all of this, which is somewhere in the Atlantic. I don't know whether this should be mapped or tagged differently. Maybe Nominatim could somehow calculate the centre of just the mainland part. Or use the location of the node with role admin_centre. This should probably be discussed on the appropriate mailing lists. answered 15 Sep '11, 13:47 Vclaw 9.2k●8●93●140 accept rate: 22% Thanks. Funny to be punished for colonialism even today :-) So, what are the "appropriate mailing lists" to address this issue? (Sorry, I'm a newbee here.) (16 Sep '11, 09:19) msol
 toggle preview community wiki:

### Follow this question

By Email:

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

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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:

×615
×304
×122
×56

question asked: 15 Sep '11, 10:23

question was seen: 5,321 times

last updated: 16 Sep '11, 09:19