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

I'm just starting to play with the databases (Nominatim, Mapnik), but I'm a little bit confused about such an easy task: "How to get a list of all cities in Germany?"

Nominatim: It could be so easy, but of course it is not. If I search all states of Germany, I get a only 13 back (of 16!). Why? Because the others do have "Deutschland" instead of "Germany" in their "isin"-column or just nothing.

Mapnik: I suppose the "savest" way would be to find all city-Points inside the "Germany"-polygon? But I can't even find the Germany-polygon. I only found the Germany-point. How do I do this?

Or am I doing it totally wrong? What would be your approach?

asked 27 Apr '12, 12:10

np00's gravatar image

np00
51448
accept rate: 0%

edited 27 Apr '12, 12:11


Several possible approaches:

  1. Import data into database then make queries, like you tried.
  2. Don't import data but instead use someone else's database - see XAPI or Overpass. (The latter can indeed limit a search to a boundary polygon, and an easy way of finding the Germany relation is typing "openstreetmap relation germany" into Google.)
  3. Don't use a database at all; download a suitable extract (e.g. from download.geofabrik.de), cut out an area if required using osmosis or similar (not required if you want all of Germany since there's already an extract for that), and then use osmosis or osmfilter to extract the objects you need.
permanent link

answered 27 Apr '12, 12:20

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Because I'm planning to get used to the databases, I will focus on the first approach.

Is my assumtion for the mapnik-database true? Could you help/lead me with that?

Thanks for the quick response!

(27 Apr '12, 12:30) np00
2

Mapnik is out of point here. Mapnik is the software used for rendering the data from a postgis database. You need to import the OSM data in a postgis database.

(03 May '12, 09:41) NicolasDumoulin

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:

×689
×341
×165
×134
×118

question asked: 27 Apr '12, 12:10

question was seen: 6,059 times

last updated: 03 May '12, 09:41

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