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

I have entered 'prow_ref like "Binfield Heath"' into Overpass Turbo wizard that returns all results of the key 'prow_ref' containing the value 'Binfield Heath', which is my local civil parish. This serves me well. However, it is of greater use if I can query those Public Rights of Way with values public_footpath|public_bridleway|restricted_byway|byway_open_to_all_traffic|public_right_of_way that do not have the key 'prow_ref' but within a given named parish, or admin_level 10 boundary, not a bounding box.

asked 03 Feb '16, 10:16

silver%20mapper's gravatar image

silver mapper
256262735
accept rate: 0%


You need to use the overpass difference operator.

So first need to query the big set (with all ways in the admin area), then query the smaller set (all ways that also have 'prow_ref' in that area), and finally apply the difference and output it.

See the example:

area["name"="xxx"]["admin_level"=8]->.a;
(
  way["highway"](area.a);
  -way["highway"]["prow_ref"](area.a);
);
out geom;
permanent link

answered 03 Feb '16, 11:14

Sanderd17's gravatar image

Sanderd17
1.1k51637
accept rate: 31%

I thank you for your prompt reply. The result includes all way types, regrettably, not ways with with values public_footpath|public_bridleway|restricted_byway|byway_open_to_all_traffic|public_right_of_way only.

(03 Feb '16, 12:46) silver mapper

It's only an example query. I don't know how ways like restricted_bridleway are tagged in your area, you should look that up, then you can change the ["highway'] selector in something else like ["highway"="bridleway"]. But as this question seems to focus on finding the "negative" or difference, that's what I gave as answer.

(03 Feb '16, 12:52) Sanderd17

For info, a restricted byway would normally be tagged "designation=restricted_byway". It's a specific access allowance that allows non-motorised traffic, so a horse and cart is OK but e.g. a moped isn't.

(03 Feb '16, 13:21) SomeoneElse ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

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:

×228
×129

question asked: 03 Feb '16, 10:16

question was seen: 2,481 times

last updated: 03 Feb '16, 13:21

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