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

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:

I need this data in a very simple form like a csv or plain text file for eg.:

Bl. 42,Cameliei
Bl. 71,Cameliei
Bl. 2A2, Aleea Codrului

Is this achievable?

asked 01 Jul '15, 18:39

andrei_teopop's gravatar image

accept rate: 0%

edited 01 Jul '15, 18:43


Note that the tagging of the building in your example is wrong. Building numbers don't belong into the building name.

(02 Jul '15, 07:57) scai ♦

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:

(click "Run" to see the results.)

As the text there says, I generated the script using the Wizard, with the input

building=* and name=* in "Ploiesti, Romania"

but I then edited the output configuration to have it generate csv instead of json. The query language is documented here:

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 way["building"]["addr:housename"](area.searchArea);, with a node, way and relation query for each additional tag.

permanent link

answered 01 Jul '15, 19:57

maxerickson's gravatar image

accept rate: 32%

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

Here's an amended script for lat lon:

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

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 01 Jul '15, 18:39

question was seen: 5,045 times

last updated: 02 Jul '15, 07:57

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