How to show the duplicated nodes, such as this, via the Overpass (API, Turbo)?

asked 20 Dec '14, 20:34

chilin's gravatar image

accept rate: 0%

edited 20 Dec '14, 20:37

As an aside, if you want to link to problem data that won't get accidentally fixed, you could use a link to a location via http://api06.dev.openstreetmap.org . That has a separate set of test data, and no one will fix your example problem by accident.

(21 Dec '14, 11:38) SomeoneElse ♦

@SomeoneElse: that probably won't work with overpass, as there's no instance pointing to the dev server I'm aware of. However, that's not a big issue. Just add [date:"2014-12-21T00:00:00Z"] to the top of the query to always reference that point in time.

(21 Dec '14, 12:02) mmd

Ok. Here's a permanent link to this place based on the due date.

(21 Dec '14, 20:06) chilin

As Overpass API is not the most common tool for this task, I will also mention a few more mainstream alternatives.

Option 1: Overpass API

This query will first determine all nodes in the current bounding box. For each node found, we will then start looking for some nodes at exactly the same location. The result will return all pairs of duplicate nodes found in the current bbox.

    (.b; - .a);
    out meta;

Unfortunately, this approach is extremely slow with out meta; (NB: this seems to be a bug, I've created a Github issue for this). If you don't need metadata information, just replace out meta; by out; and you will get the response almost instantly.

Try it on overpass turbo: very slow (with metadata) and fast (without metadata)

alt text

Option 2:

I'd really recommend to also look at keep right! (analysis data is a few weeks old): see this example for a layer with multiple nodes on the same spot

Option 3:

In addition to that, JOSM validator will warn you regarding many unconnected nodes without physical characteristics in that area - and even fix them! That's probably the best way to go.

permanent link

answered 20 Dec '14, 21:19

mmd's gravatar image

accept rate: 37%

edited 21 Dec '14, 11:11


Thank you for such a detailed answer.

(20 Dec '14, 22:54) chilin

It should also be noted that multiple nodes on the same spot are not necessarily an error, and sometimes even required (e.g. in multi-level buildings).

(21 Dec '14, 11:37) Tordanik

For those coming here via a search, the above Overpass query requires an extra ';' after the '.a' variable:

(.b; - .a;);

(07 Jun '18, 12:47) DaveF
Your answer
toggle preview

Follow this question

By Email:




Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • numbered list: 1. Foo 2. Bar
  • basic HTML tags are also supported

Question tags:


question asked: 20 Dec '14, 20:34

question was seen: 3,241 times

last updated: 07 Jun '18, 12:47

powered by OSQA