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

I am trying to download all roads for a specific area rel:2800276, including those exactly on the boundary of the area (e.g. way:171480859). However, the query seems slow if I add a few commands (Line 3-4) specifically ask for proximity to the boundary of area like this:


Should I use some other methods to include the roads exactly on the boundary? It looks like by default the area filter just report features with at least one point properly within the area.

** For simplicity, all ways with highway tag are assumed to be roads here.

asked 07 Oct '22, 07:58

yikhim's gravatar image

accept rate: 0%

I hope I'm proved incorrect, but I don't think there's a simple way to perform this. To me the is_in command should be able to perform this.

First, the reason your routine is slow is way["highway"](around:0.0); is searching the whole globe for all for highway. It needs to be passed the desired area to search. Your next line is superfluous as it's duplicating the previous.

This routine: The first 'out' is, hopefully, all ways touching the relati9on. Second is all ways within the relation. Third is the relation itself.

out geom;

out geom;

.Kwun out geom;

General Point: you may want to check if the boundary does actually go down the centreline of the road. They rarely do.

permanent link

answered 07 Oct '22, 18:55

DaveF's gravatar image

accept rate: 16%

edited 07 Oct '22, 19:08

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: 07 Oct '22, 07:58

question was seen: 1,054 times

last updated: 07 Oct '22, 19:08

powered by OSQA