I'm trying to fetch house locations from streets that match a query search:

{{value="Sancti"}}
<osm-script output="json">
  <query type="relation">
    <around lat="40.96515" lon="-5.664" radius="1000"/>
    <has-kv k="addr:street" regv={{value}}/>
  </query>
  <union>
    <item/>
    <recurse type="down"/>
  </union>
  <print/>
</osm-script>

At this point, I would love to be able to get the same amount of information that can be retrived by nominatim when query for a 'ways' that match addr:street 'relation' value like this

So, question is, How can I extend query to retrieve info about buildings on the same street ?

Thanks

asked 02 Jun '13, 17:30

inean's gravatar image

inean
1112
accept rate: 0%

edited 02 Jun '13, 23:01

1

Please explain what you mean by "fetch relations of which matched ways are parent of". I suspect that you may have a misconception here about how buildings are mapped; they do not usually have a direct relationship to a nearby street, but instead they just carry the street name in their addr:street tag. There is an "associatedStreet" relation but it is not widely used.

(02 Jun '13, 18:59) Frederik Ramm ♦

Ok, I've rewritten question a bit, hope this helps. Said that, Nominatim says that there's some kind of parent-child relation between 'relations' with 'tags' 'type' = 'place:house' and 'ways'. What I want is to get that info with overpass.

I'm trying to implement some kind of adapatative search with overpass to retrieve streets that matchs an user query. At some point, it would be interesting that, with house number info, get coordinates of that building. The main reason to not use Nominating is that I need all available candidates around user coordinates and within a radius.

(02 Jun '13, 19:56) inean
1

Nominatim does the "parent-child relation" via the name of the street, it's a simple overpass query you almost did already.

And getting a coordinate for a building is getting the geometry and calculation some middle point.

I agree with Frederik, I can't guess what you really want to do.

(04 Jun '13, 13:55) _al
Be the first one to answer this question!
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:

×355

question asked: 02 Jun '13, 17:30

question was seen: 1,271 times

last updated: 04 Jun '13, 13:55

powered by OSQA