Hi, I've imported the tiger database and i now have house numbers in nominatim. I am trying to get a list of all house numbers on a street. Currently I am iterating through numbers using the local nominatim API to get the highest number but that is very inefficient. How would I get a list of house numbers using SQL? I am thinking it would be something like: SELECT house_number, latitude, longitude FROM table WHERE street = "10th street NW, Washington"; Regards, Bob asked 21 Jun '14, 13:36 bob12 |
There is currently no documentation available (at least not on the OSM wiki) describing the database schema nominatim uses. To get around this you either need to have a look at the scripts that create the database or alternatively use psql and the \d command to get a list of tables and then \d tablename to get the columns. If you do that, it would be a good idea to put the results of your research on the wiki :-). answered 22 Jun '14, 12:07 SimonPoole ♦ 1
OK this looks to be getting me on the right path: $pgsql nominatim $pgsql> SELECT * FROM points WHERE street = 'xyz street'; Will return all house numbers and coordinates I'll Write up a better query and add it to the wiki if it works out well
(22 Jun '14, 13:18)
bob12
|