Hello, I've imported the osm file of USA from CloudMade. I've noticed that neither my server nor openstreetmap.org 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! http://help.openstreetmap.org/questions/12150/missing-house-numbers-in-local-nominatim-instance asked 14 Aug '12, 14:13 silviu_ |
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. answered 18 Aug '12, 08:08 lonvia 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 https://github.com/twain47/Nominatim/blob/master/website/reverse.php#L94 . 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_
2
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
|