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


I'm using python with OsmApi - a beautiful python api that let's me directly connect and download data as lists of dictionary objects based on things like nodes, ways, and relations.

I'm trying to extract all the data in a region using its relation id, but since the way it works is to retrieve the boundary way objects of the region, I'm not too sure on how to get all the ways/nodes inside it efficiently.

Any help would be greatly appreciated :)

asked 29 Sep '14, 01:51

jmoak3's gravatar image

accept rate: 0%

If that just front-ends the main OSM API (as the wiki page suggests) I wouldn't use it AT ALL for large downloads. What you need is something that front-ends something like Overpass. Perhaps ask the authors of your Python framework how they suggest that you do that?

permanent link

answered 29 Sep '14, 08:59

SomeoneElse's gravatar image

SomeoneElse ♦
accept rate: 16%

I was afraid of that, all roads always point to Overpass haha

Thanks, I'll send them some emails and look into how to integrate Overpass with my current python project :)

(29 Sep '14, 18:37) jmoak3

If you want to download all nodes, ways etc. inside the area using osmapi, all you can do at the moment is using a so called "bounding box", this means you simply specify a rectangle, and you get everything that's inside that rectangle. To do this, use the Map function.

But finally if you have a very specific area and you only want ways inside it, then you're better of to import the OpenStreetMap data in a database (e.g. PostgreSQL with PostGIS), and then you can use the full query power to achieve exactly what you want.

permanent link

answered 07 Oct '14, 17:05

Odi's gravatar image

accept rate: 0%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 29 Sep '14, 01:51

question was seen: 7,919 times

last updated: 07 Oct '14, 17:05

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