I'd like to list the names of every streets in a given city (from OSM data). How can I do that?
I've tried with nominatim a query like: http://nominatim.openstreetmap.org/search?q=residentials%20in%20delft,netherlands
But it returns an empty result (while if I look for "pubs", it works fine). Using the details.php, I see that nominatim can list them: http://open.mapquestapi.com/nominatim/v1/details.php?place_id=7227120
I'm working around using Xapi and a bounding box, but that works kind of ok only if the city is not surrounded too closely by other cities. Example of such a query: http://azure.openstreetmap.org/xapi/api/0.6/*[highway=residential][bbox=2.8634295463562,49.2131958007812,2.936068534807,49.2601203918457]
Can anyone suggest me a way to get it working via nominatim?
asked 12 Feb '11, 11:29
If you want to do it regularly for lots of cities this is the way:
Then just filter out all the names in the resulting OSM xml file match all lines containing
This is my osmosis line without poly file
Then I run:
Creating a Polygon file
With Josm I created the a .osm file like this,
With perl osm2poly.pl <sodermalm_poly.osm>sodermalm.poly I got this:
Then I ran osmosis:
Nominatim is designed to be a geocoding and reverse geocoding system rather than a general method of downloading data from OpenStreetMap and as such only a limited number of 'special' phrases work - normally restricted to points of interest. That said there will shortly be a downloadable version of the nominatim data set available which you could filter yourself for this information. Please watch for anouncements on the geocoding mailing list.
In the mean time you can download a suitable OSM file (either from xapi, or a planet extract or even the full planet file) and filter it using the bounding-polygon option of Osmosis. You may be able to download the polygon from OSM, in other cases you will have to draw it yourself.
You should also take a look at http://maposmatic.org/ , which does pretty much what you are looking for and allows you to download either a rendered version or the raw data. They explain how they did it in the "about" page, and the tool they wrote is available. It requires that you have a local installation of OSM tools and database.