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

My goal is get all the addresses for some different countries. So I downloaded an *.osm file from here http://download.geofabrik.de/ for a certain territory which contained a few countries and extracted the data from that file using osm2psql to a db. There were no errors, all went well.

The sql query I have to use is something like:

select * from planet_osm_point where addr:housenumber is not null or addr:street is not null.

However, adding and addr:country = 'SOMETHING' won't help because I've tried doing that and got around 100 rows which was, obviously, wrong. I know the polygons is a way to go, isn't it?

So how do I do that?

asked 20 Aug '14, 18:58

memeran's gravatar image

memeran
26113
accept rate: 0%

edited 21 Aug '14, 18:51

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

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:

×202
×147
×92
×58
×18

question asked: 20 Aug '14, 18:58

question was seen: 6,441 times

last updated: 21 Aug '14, 18:51

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