Why not ask your question on the new OpenStreetMap Community Forum?

I'm using overpy library to query overpass via python.

I'd like to have a list of entities with a certain tags and their coordinates. For nodes this is straightforward. For closed ways (polygons) I'd just need the centroid lat/lon.

Often those aren't stored in center_lat,center_lon, so I'm launching queries against the list of nodes associated to that ways entity.

This query, using get_nodes, leads to a lot of HTTP errors (apparently overpy requires to launch queries again to get this). So, I'm wondering if there's a more efficient route to get what I need (and in the mean time don't bother the servers so much).

asked 10 Oct '17, 16:53

WouterDX's gravatar image

accept rate: 0%

use "out center" as e.g. in this query which gives the center nodes of buildings.

permanent link

answered 11 Oct '17, 04:07

escada's gravatar image

accept rate: 21%

Perfect, thanks.

(11 Oct '17, 09:03) WouterDX
Your answer
toggle preview

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](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:


question asked: 10 Oct '17, 16:53

question was seen: 4,895 times

last updated: 11 Oct '17, 09:03

powered by OSQA