How to narrow the result from Nominatim with only cities and countries, no additional

المشرف العام

Administrator
طاقم الإدارة
I'm trying to get WKT or GeoJson polygons of cities and countries from Nominatim (for example, Paris and France). I send a GET request but it returns me several results named "Paris" or "France". How may I narrow results only to a capital and a country. Here's my request url:

http://nominatim.openstreetmap.org/search/fr/paris?format=json&polygon_geojson=1And I get an array of 10 objects where only one is the capital:

class: "boundary", type: "administrative".The rest are:

class: "place", type: "isolated_dwelling"class: "place", type: "hamlet",class: "place", type: "neighbourhood"and so on...How to select only the desired city and only the desired country ignoring rest of results with the same name?



أكثر...
 
أعلى