I want to extract city specific data from OSM for Finland. I have the data for Finland but I need the data for only 5 cities: Helsinki, Espoo, Vantaa, Kauniainen and Siuntio. I could extract the required data for Helsinki, but I need the city borders for the rest of the cities (so I can make a polygon of that). If I have the polygons I can extract the required data with osmconvert.

Can you help me with information on how to extract the borders for these cities?

Do you know any open api that provides me these information?

asked 25 Jan '13, 09:47

bgergo0826's gravatar image

bgergo0826
14112
accept rate: 0%


Please have a look at question this question:

You can download the full boundary with http://overpass-api.de/api/interpreter?data=(rel[name='Helsinki'];>;);out; and then convert the return value with http://svn.openstreetmap.org/applications/utils/osm-extract/polygons/rel2poly.pl into a polygon.

permanent link

answered 25 Jan '13, 11:57

Roland%20Olbricht's gravatar image

Roland Olbricht
6.3k35885
accept rate: 36%

1

Again this will not work for Esbo, since it is a multipolygon and rel2poly doesn't support that..

(26 Jan '13, 22:37) emj

There are several things about borders and tools that you have to think about.

  1. you will often end up with cut off data on the borders
  2. borders in OSM are seldom perfect
  3. you can import the borders and base your analysis on that, if you need exact borders.

So do like the venerable metro extracts and draw your own bounding boxes for extraction and if it is important to only get specific data inside Esbo you can use pgsql to do that.

You can see these polygons on Nominatim, and if you really want them you can cut and paste from HTML, but it will give and over view of what exactly you are getting instead of blindly copying from Overpass. Here are some examples, search for the rest on http://nominatim.osm.org

You can copy the polygon from the javascript of those pages:

        var feature = freader.read('POLYGON((
...
),(
...
))

Note that Esbo is a multipolygon, can osmconvert handle that?

permanent link

answered 25 Jan '13, 11:38

emj's gravatar image

emj
1.9k123447
accept rate: 15%

edited 26 Jan '13, 22:54

Your answer
toggle preview

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:

×533
×350
×34
×32

question asked: 25 Jan '13, 09:47

question was seen: 5,431 times

last updated: 26 Jan '13, 22:54

powered by OSQA