Hello, i'm new to OpenStreetMap world and i would like to know if it woud be possible and how to extract all building names in a selected city (my requirement is Ploiesti, PH, Romania). I need those in order to integrate them as POIs in a specialized application. P.S: When stating "building names" i mean block of flats/appartment buildings numbers An example building for better understanding: http://nominatim.openstreetmap.org/details.php?place_id=75757510 I need this data in a very simple form like a csv or plain text file for eg.:
Is this achievable? asked 01 Jul '15, 18:39 andrei_teopop |
You may need to tune the script to account for additional tags being used for the building names and do some post filtering, but Overpass API and/or Overpass Turbo is a good tool to look at for this: http://overpass-turbo.eu/s/adr (click "Run" to see the results.) As the text there says, I generated the script using the Wizard, with the input
but I then edited the output configuration to have it generate csv instead of json. The query language is documented here: http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL To add a tag like "addr:housename" to the results, you would need to add additional lines to the main body of the script, like answered 01 Jul '15, 19:57 maxerickson First, thank you very much for the answer. I see that the list does not contain all the buildings listed in nominatim. Do you know the cause of this behaviour? Also, would it be possible to add geographical coordinates (longitude and latitude) to every entry in that generated output?
(01 Jul '15, 20:26)
andrei_teopop
1
Here's an amended script for lat lon: http://overpass-turbo.eu/s/adv The coordinates are the center returned by Overpass and may not lie inside of the building (search the docs for 'center'), also take a look at the docs for "Output Format" to see what you can get as far as the output (you can also get various other structured formats like json, xml). As far as the buildings that are not returned, as I said in my answer, it depends on the tagging in use in the area (I based the example on the building you linked and didn't look at any others), if buildings are also having addr:housenumber or addr:housename, you will need to add those to the script, both in the output specification and as queries, and then presumably do some post processing to consolidate those columns.
(01 Jul '15, 20:43)
maxerickson
|
Note that the tagging of the building in your example is wrong. Building numbers don't belong into the building name.