I am trying to query on hiking routes http://overpass-turbo.eu/s/q52 using the following centred on London.

out geom;

I am finding I getting data I don't want which has a performance impact. I think I have two issues.

  1. Some of the relations are very big. (3212473 Greenwich Meridian Trail 20469 Thames Path)
  2. I am getting relations that are way outside my viewport (Shakespeare's Way - 71448) and I can't see why.

On point 1., can I process the relation - eg only output the ways that appears in my viewport. If I am interested in London I dont want details of the route near lincoln.

asked 30 Jun '17, 09:53

andrewblack's gravatar image

accept rate: 57%

edited 30 Jun '17, 10:25

Re Shakespeare's Way - something odd about the data. Investigating further

(30 Jun '17, 12:43) andrewblack

I have an answer to this. Will write up tomorrow

(30 Jun '17, 23:42) andrewblack

If you want all relations being tagged with route=hiking but only those ways of those relations which are inside your bounding box, you should try following query:

// Store all interesting relations which intersect with the bounding box in
// a set called "interestingrelations".
// Store all way members of the relations in the set "interestingrelations"
// in the set "alltheirways".
// Filter "alltheirways" using a bounding box filter. Store result in "waysinside".
// Output geometry of "waysinside".
.waysinside out geom;

Features of Overpass QL in use:

permanent link

answered 10 Jul '17, 19:47

Nakaner's gravatar image

accept rate: 11%


Wow, that is a life saver! Here's how I finally got just the slice of the border of Paraguay that I needed:




.waysinside out geom;

(12 Oct '20, 08:29) jidanni

FYI: http://overpass-turbo.eu/s/Z1J relation(389884); way(r)(-25.2,-59.5,-24.2,-58); out geom;

(14 Oct '20, 19:49) DaveF
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: 30 Jun '17, 09:53

question was seen: 2,912 times

last updated: 14 Oct '20, 19:49

powered by OSQA