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

Hello,

I would like to get a list of all german cities with its borders (as polygon) and name. I started to import the data into the database by using osmosis:

./osmosis --read-pbf file=/mnt/hgfs/VM-SharedFolder/germany.osm.pbf --tf accept-nodes place=village,town,city --tf accept-ways place=village,town,city --write-pgsql host=localhost database=DB_NAME user=USER password=PWD

This filled the database tables (nodes, relations etc.) but I do not know how to extract a polygon by using these data. Any hints?

Thank you, hem

asked 24 Sep '11, 13:05

hem's gravatar image

hem
1111
accept rate: 0%


I cannot give you a concrete solution, but have a general look also at the blog of Jochen Topf about boundary relations.

And if you have more detailed questions I would even recommend to ask further at the German subforum at forum.osm.org

permanent link

answered 24 Sep '11, 13:49

stephan75's gravatar image

stephan75
12.6k556210
accept rate: 6%

What do you mean by "extract a polygon"? You can get the name and the polygon of all the municipalities boundaries from the database with such a query:

select name,way from "public".planet_osm_polygon where admin_level='8'

You can also download shapefiles from cloudmade or geofabrik

permanent link

answered 28 Sep '11, 10:26

NicolasDumoulin's gravatar image

NicolasDumoulin
3.3k42256
accept rate: 13%

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:

×710
×252
×92
×83

question asked: 24 Sep '11, 13:05

question was seen: 20,058 times

last updated: 28 Sep '11, 10:26

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