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

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's gravatar image

bob12
41113
accept rate: 0%


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 :-).

permanent link

answered 22 Jun '14, 12:07

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

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

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:

×147
×39
×18
×7

question asked: 21 Jun '14, 13:36

question was seen: 4,954 times

last updated: 22 Jun '14, 13:18

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