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

Can I search for a country states(admin level=4) in Viewport via nominatim search?

http://nominatim.openstreetmap.org/search?q=district&countrycodes=IL&limit=20&format=xml&email=info&bounded=1&viewbox=34.270278754419145,33.34013,35.876804,29.496639&debug=0&addressdetails=1

this search return all states in a country. but only if display_name like "District". there is a way to filter results and get only places admin_level=4 ?

Thanks!

asked 02 Jan '14, 15:04

Izikb's gravatar image

Izikb
1223
accept rate: 0%

edited 02 Jan '14, 15:39

iii's gravatar image

iii
4.9k84082


You might want to use the bbox operator but there is AFAIK no operator to restrict the admin_level:
http://wiki.openstreetmap.org/wiki/Nominatim#Parameters

So either you are able to prefilter your query by adjusting the state,country, ... addresses or you may use the Overpass API instead

permanent link

answered 02 Jan '14, 15:38

iii's gravatar image

iii
4.9k84082
accept rate: 10%

Thanks! the problem is that Overpass API is too slow

(02 Jan '14, 15:49) Izikb
1

Hmm Qverpass API is one of the fastest ways to work remote with global OSM data. The only alternative would be to do the processing local using OSM planet extracts.

BTW.: All APIs are hosted on donated resources and maintained by volunteers. So they require fair use and are esp. not suitable to do bulk transfers: http://wiki.openstreetmap.org/wiki/Nominatim_usage_policy

(02 Jan '14, 15:54) iii

OK, maybe you can help me :)

I do this with overpass, I want to get states(admin_level=4) in this bbox. this is my code:

http://overpass-turbo.eu/s/1V7

why it's take a few minutes to return results? in nominatim it's really fast.

I use overpass turbo

Thanks !!

(02 Jan '14, 16:00) Izikb

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
×129
×58

question asked: 02 Jan '14, 15:04

question was seen: 9,581 times

last updated: 02 Jan '14, 16:05

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