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

Hello, I've imported the osm file of USA from CloudMade. I've noticed that neither my server nor return the house number in the xml/json answer you get from a reverse geocoding interogation. I've tried with zoom=18 but with no success. Is there any way to get the house number in USA with reverse geocoding? Is there a problem with my import? I've also imported TIGER Edges as I saw in the link below but it didn't help. Thank you!

asked 14 Aug '12, 14:13

silviu_'s gravatar image

accept rate: 0%

Your import is ok. Nominatim currently uses the TIGER house number data for geocoding only. Reverse geocoding returns only house numbers that are mapped in OSM.

permanent link

answered 18 Aug '12, 08:08

lonvia's gravatar image

accept rate: 40%

So, is there no way to get house numbers on reverse geocoding?

(20 Aug '12, 10:29) silviu_

It should be possible to add extra sql to search for tiger house numbers in addition to osm house numbers. You'd need to add code to search location_property_tiger around here . It would require an extra geometry index on the centroid field but it should be possible. If you'd like to write this an submit a patch it would be great.

(20 Aug '12, 13:34) twain

Thanks for your answer. Could you please elaborate on the extra geometry index on the centroid field which I should add? I'm thinking I should a line of this sort $sSQL = "select place_id from location_property_tiger where parent_place_id in (".$sPlaceIDs.") and housenumber = '".pg_escape_string($aSearch['sHouseNumber'])."'"; which I took from the search.php source code. Thank you!

(21 Aug '12, 12:23) silviu_

You can do it that way round instead, although you will still need to at least order by distance. I was assuming you would do a goemetry search using st_dwithin(point, centroid) on the location_property_tiger table where the search distance was a small distance.

(21 Aug '12, 13:40) twain

I've been looking over the code and from what I understand, this line is responsible for retrieving details about the address: $aAddress = getAddressDetails($oDB, $sLanguagePrefArraySQL, $iPlaceID, $aPlace['country_code']); (line 151 in reverse.php) acording to the place id. It returns a map of some sort in which the house_number should be (key-value) if it is available. I tried to hardcode the house number inside $aPlace, before the call of the function above, to see if it appears as a result in my query, but it does not. Do you have any idea where can I find the implementation of the getAddressDetails?

(22 Aug '12, 15:41) silviu_

The comment section is really not a good place to discuss implementation details. Please, bring your issue to the geocoding mailinglist which is much better suited for these kind of questions.

(23 Aug '12, 07:25) lonvia
showing 5 of 6 show 1 more comments

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: 14 Aug '12, 14:13

question was seen: 9,157 times

last updated: 23 Aug '12, 07:25

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