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

Is it possible to restrict a query result with nominatim to say "countries, counties and towns"? I am not too interested in the roads or streets for example, rather the high level adminsitrative regions.

asked 17 Mar '14, 21:42

leforthomas's gravatar image

leforthomas
16113
accept rate: 0%


There is a currently undocumented parameter featuretype that might be useful for you. Adding a parameter featuretype=settlement to the query, e.g. like this, restricts the results to objects below country level and above street level. That means that results will include states, counties, cities and villages and also natural features like national parks and rivers, but they do not contain countries, streets or POIs.

Other possible values for featuretype are: country, state, city.

permanent link

answered 18 Mar '14, 12:40

lonvia's gravatar image

lonvia
6.2k25789
accept rate: 40%

1

that sounds pretty much like what I need. Is it possible to include countries as well? eg can I do featuretype=settlement,country? (seems to work)

(18 Mar '14, 13:13) leforthomas
1

Multiple values are not supported, so including countries does not work. featuretype=settlement,country just works like you have not given any parameter at all.

(18 Mar '14, 13:38) lonvia

If I enter this "fish and chips huntingdon" that works and gives the three shops mapped in my town, is that to sort of restriction you wanted?

permanent link

answered 17 Mar '14, 22:14

andy%20mackey's gravatar image

andy mackey
13.2k87143285
accept rate: 4%

No. What I want is to type 'Paris' and only get the countries, counties or towns called Paris, but none of the streets or airpots (or fish and ship shops) that have Paris in their names.

(17 Mar '14, 22:17) leforthomas

Using my a Win7 PC "paris" search yields this (screenshot).

(18 Mar '14, 09:08) andy mackey

OK, look down in your list and you will find "Bus stop, Paris...". What I am asking is whether or not there is a way with the API to filter out these type of results (bus stops, etc...).

(18 Mar '14, 09:14) leforthomas

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:

×689

question asked: 17 Mar '14, 21:42

question was seen: 5,919 times

last updated: 18 Mar '14, 14:24

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