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 |
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 . answered 06 Feb '16, 11:02 stephan75 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
|