This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Asking Nominatim for county names is inconsistent (example: Nevada counties)

1

When asking Nominatim for a County – in some cases you must have the word “County” while in others you must NOT have it (in order to get polygons)

For example in Nevada Counties

  1. “Washoe County” works
  2. “Washoe” – doesn’t work
  3. “Churchill county” doesn’t work
  4. “Churchill” works

.1. http://nominatim.openstreetmap.org/search.php?q=COUNTY_NAME%2CUnited%20States&addressdetails=1&limit=10&format=xml&polygon_text=1&email=MY_EMAIL&countrycodes=USA&bounded=1

Is it a known issue? Are there recommendations about how to request the data in a consistent way? Is there an open source code (preferably c#) that wrap these kind of calls and do the work-arounds?

=== Addition: ===

Is it possible that when searching for a name (w/o the "county" suffix or other pre/suffix) the results will include the the items with the suffix, and preferably ordered by higher to lower level (meaning New York will give New York state before New York city)

and from the other direction: If you have suffix - after results including the suffix - add results for same name w/o the suffix - for known words suce as State, Provice, County and so on

asked 14 May '13, 07:49

Dekel%20Israeli's gravatar image

Dekel Israeli
26113
accept rate: 0%

edited 16 May '13, 14:33

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


One Answer:

2

I'm not sure it is an issue as such. Nominatim is finding the place names that are mapped: Churchill and Washoe County. A workaround would have to handle knowing what admin levels mean and either removing or adding the extra word(s) (at the beginning or end as appropriate, in whatever language is determined relevant). Even admin_level 6 in USA alone isn't simple, being "Counties, parishes in Louisiana, boroughs in Alaska and also in New York City and the Independent cities (Virginia; Baltimore, MD; Carson City, NV; St. Louis, MO)".

The good news is that nominatim is already open source (but not C#) so if you can come up with a way that works I'm sure it would be welcomed.

answered 14 May '13, 13:39

EdLoach's gravatar image

EdLoach ♦
19.5k16156280
accept rate: 22%

Source code available on GitHub .