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 |
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. answered 24 Mar '14, 11:58 Frederik Ramm ♦ 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. answered 25 Mar '14, 17:13 stephan75 |
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