Hello,

We want to do the following. Please tell us if it is possible and how is the easiest way to do this?

We want to set a parameter - country and city and get all street names that are found in this city. Get them as a list. Could this happen?

Can we use directly your database with API? We not need uploaded everything on our own server? Can we see somewhere a sample query, how to do it and get the data? Or step by step help info?

Thank you very much!

asked 24 Mar '14, 11:47

Petar81's gravatar image

Petar81
26225
accept rate: 0%

Hello,

I was trying to get all streets names from a service on http://www.gisgraphy.com when I saw that there is a Ban list in which my server can go in on multiple requests. My question is: what is the best way to get all streets from multiple Cities using PHP with given Name of City or Geo location?

Regards

(27 Mar '14, 10:34) Petar81

OpenStreetMap does not offer an interface for that. You will have to download the data for the city in question (or a whole country or even more), import it into a database, and extract the road names that lie within the boundary. The "Nominatim" geocoder could be a starting point for this, and there's even an export script for that here https://github.com/lonvia/Nominatim/blob/export-script/utils/export.php but I'm unsure if this still works.

permanent link

answered 24 Mar '14, 11:58

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
72.0k846521119
accept rate: 24%

Thank you!

Is not possible we contact with API to openstreetmap.org, right?

(25 Mar '14, 09:32) Petar81
2

Contacting the API is possible of course. But as already explained by Frederik it doesn't support such a query. And it should not be used for downloading huge amounts of data. See downloading data in the wiki for alternative methods.

(25 Mar '14, 10:20) scai ♦
1

It's possible to use the API if it is for a limited area and if you do this only once. But as Frederik said, you will get OSM raw data where one street can be divided in multiple small segments/ways. You could also check the application http://maposmatic.org/ creating street indexes (all details here http://maposmatic.org/about/)

(25 Mar '14, 13:31) Pieren

please enter "street list" in the search field of this FAQ site.

There are already solutions for your aim.

permanent link

answered 25 Mar '14, 17:13

stephan75's gravatar image

stephan75
12.5k454209
accept rate: 6%

Your answer
toggle preview

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:

×92
×87

question asked: 24 Mar '14, 11:47

question was seen: 12,978 times

last updated: 27 Mar '14, 20:30

powered by OSQA