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

Is there a way to get an address range for a given relation or way? for example, way 102065354 has 10 nodes. I like to know what address range this street segment covers. This is a street segment called "East Santa Fe Street" in Olathe, ks, US. Using Nominatim's reverse geocoding api like this

http://nominatim.openstreetmap.org/reverse?format=xml&osm_type=W&osm_id=102065354&zoom=18&addressdetails=1

returns me the street name, city, state, etc.. but not exactly what I am looking for. I need to know what range of addresses fall in that street segment.

asked 19 Nov '12, 22:58

kcjailbirds's gravatar image

kcjailbirds
141131319
accept rate: 0%

edited 20 Nov '12, 10:09

scai's gravatar image

scai ♦
33.3k21309459

2

There aren't any addresses in the near surrounding of this street in OSM's database so far. But you can try to improve our data and add them.

(20 Nov '12, 06:12) scai ♦
1

Thank you. This was just an example of a street with no address range data. I am asking in general, is it possible to get address ranges for streets? Is there a way to do get that data or extrapolate that range of addresses? Is address range data available anywhere that anyone knows of?

(20 Nov '12, 14:07) kcjailbirds

It may be not obvious for all but to retrieve address ranges from OSM, someone has to add them first into the OSM database. See the wiki documentation about addresses and especially the section about address interpolation.

If addresses ranges are missing in your area of interest, either add them into OSM or import them into OSM (only if the source is compatible with the OSM licence) or don't use OSM and look for another source.

permanent link

answered 21 Nov '12, 13:31

Pieren's gravatar image

Pieren
9.8k2083157
accept rate: 15%

As far as I know there is no straightforward way for this.

In OSM addresses aren't assigned to way IDs or ways in particular, instead there are separate address nodes and ways (the latter usually corresponding to building outlines or other areas). One exception are the three address relation approaches mentioned here but they are rarely used.

One possible solution is to use the OverpassAPI to retrieve all addresses for a specific street name in a given city, or bounding box, or near some specific element.

An example: the following query will return all address nodes for the street Neuhaus in the given bounding box (copy it by hand, the markup parser breaks it):

http://overpass.osm.rambler.ru/cgi/interpreter?data=[out:json];node["addr:street"="Neuhaus"](50.67,10.91,50.70,10.94);out;

You should then repeat the query, but this time with way instead of node to get all available addresses. Afterwards just parse the outputs and search for the lowest and highest addr:housenumber to get your range. Of course this is only the address range in OSM's database.

If you don't know the bounding box of your way you can also ask the Overpass API or Nominatim for the location and calculate it yourself, or specify the city instead of the bounding box.

There might be other solutions.

permanent link

answered 21 Nov '12, 15:07

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

edited 21 Nov '12, 15:08

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:

×689
×202
×133
×36
×2

question asked: 19 Nov '12, 22:58

question was seen: 14,958 times

last updated: 21 Nov '12, 15:08

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