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

I want to get all the ways along a track (set of points) for classification. Currently, I create a query by concatenating each point like so:


etc.. However (as I expected) this takes too long for a couple of thousand points. I don't want to increase the timeout.

Is there a more efficient way for this kind of query?

asked 05 Feb '16, 19:08

lcanis's gravatar image

accept rate: 0%

If I am not wrong, the around parameter works with a real circle ... that clipping is very time consuming for the server, I assume.

So a better way can be that you calculate rectengular bounding boxes around each point, and the you do overpass-api queries by those boxes as parameter, that should be quite faster.

Or download a country extract from raw OSM data from any sourve mentioned at planet.osm, and do some filtering and clipping with your batch calculated mini bounding boxes with tools like osmfilter, osmconvert .

permanent link

answered 06 Feb '16, 11:02

stephan75's gravatar image

accept rate: 6%

Thank you for your answer. I tried a bounding box around each point first, but the speed increase is not very big. Currently I'm combining the points and their bounding boxes until I reach a given area for the bounding box, thereby reducing the number of combined requests drastically. This is much faster, but still pretty slow: Around 20s for an 80km track. I have since learned about alpha shapes, this could be a way to go but it would make the request more complicated.

I am reluctant to go the raw OSM data route since in the end I would need to practically have the whole planet.osm available locally or on a private server and I was hoping to be lightweight and fast.

(07 Feb '16, 13:04) lcanis

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: 05 Feb '16, 19:08

question was seen: 2,994 times

last updated: 07 Feb '16, 13:04

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