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

There's a set of motorways surrounding a city. All motorways for the country are either paid (default), or toll-free (where explicitly marked).

Therefore, it makes sense to mark the toll-free motorways as toll=no, as no tagging implies toll=yes in the general area.

Now, I can query Overpass API (from JOSM) - filtering way["highway"="motorway"] gives me all motorways; filtering way["highway"="motorway"]["toll"=*] gives me motorways with explicit toll info. I'm interested in the opposite: in motorways which are not tagged with toll. I haven't found that anywhere in the examples, here, or on the Internet at large.

Is there a way do find "ways that have this tag but not that tag"?

asked 04 May '17, 16:04

Piskvor's gravatar image

Piskvor
1.3k91535
accept rate: 37%


This is possible by using regular expressions and querying for ["highway"="motorway"]["toll"!~".*"].

However it sounds like you are about to perform an automated edit. Can you be really sure that all highways without a toll tag require a fee? I guess there is still a chance that some motorways are missing a toll=yes tag.

permanent link

answered 04 May '17, 16:50

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

That's what I am looking for, thank you. And on second look, my wording does sound suspicious :) Do not worry, I am not about to mass-edit: I am looking for a tool to check for missing spots. I have recently driven one part of the city's ring road, so now I'm comparing my notes with the DB to see if all the places around the city that are enumerated in a city bylaw and physically marked as "toll not required" are marked as such in OSM. Have been using two JOSM layers, one for toll=yes, other for toll=no, and checking for gaps visually; wondered if there was an easier way.

(04 May '17, 16:57) Piskvor
3

A recent update added a nicer syntax for missing tags, ["highway"="motorway"][!toll].

(04 May '17, 20:19) maxerickson

(btw yes, all motorways without a specific physical tag are toll roads here, by law. What I'm checking is that OSM tagging matches the physical tagging)

(05 May '17, 10:48) Piskvor

And it seems that, in the area I visited, all toll roads have already been correctly tagged as toll=yes; there were some parts left untagged where toll=no was the OTG situation.

(05 May '17, 13:31) Piskvor

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:

×930
×483
×54
×12

question asked: 04 May '17, 16:04

question was seen: 2,719 times

last updated: 05 May '17, 13:31

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