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

I' running the following query

[out:json][timeout:25];
(
nwr(poly:"52.450426 13.286183 52.458324 13.286183 52.458324 13.299744 52.450426 13.299744 52.450426 13.286183");
);
out body;
>;
out skel qt;

and I just found that some features (only one example handy right now) are retrieved twice possibly even more.

The example in question:

{'type': 'way', 'id': 48590101, 'nodes': [2850024375, 3828309463, 3975571367, 3975571366, 5217921963, 3975568951, 617181077, 617181080, 2850024367, 3975568954, 3975571362, 2850024371, 3828309460, 2850024372, 3975571372, 2850024375], 'tags': {'area': 'yes', 'bench': 'yes', 'bin': 'yes', 'covered': 'partial', 'description': 'U Dahlem Dorf U3 Bahnsteig', 'layer': '-1', 'level': '-1', 'name': 'U Dahlem-Dorf', 'public_transport': 'platform', 'railway': 'platform', 'subway': 'yes', 'wheelchair': 'yes'}} {'type': 'way', 'id': 48590101, 'nodes': [2850024375, 3828309463, 3975571367, 3975571366, 5217921963, 3975568951, 617181077, 617181080, 2850024367, 3975568954, 3975571362, 2850024371, 3828309460, 2850024372, 3975571372, 2850024375]}

Even more curious that it is once retrieved with all tags and once without its tags. Anyone stumbled accross this before? Is my query maybe malformed?

asked 01 Feb '21, 12:20

Thagor's gravatar image

Thagor
31112
accept rate: 0%

edited 01 Feb '21, 12:36

maxerickson's gravatar image

maxerickson
12.7k1083176

I am seeing something similar: My query searches for primary, secondary, and tertiary roads within a bounding box.

data=[out:json];( node["highway"="primary"]${bBox}; way["highway"="primary"]${bBox}; relation["highway"="primary"]${bBox}; node["highway"="secondary"]${bBox}; way["highway"="secondary"]${bBox}; relation["highway"="secondary"]${bBox}; node["highway"="tertiary"]${bBox}; way["highway"="tertiary"]${bBox}; relation["highway"="tertiary"]${bBox}; );out body;>;out skel qt;)

Though this has returned good data elsewhere, I am finding that when the bounding box is in Portugal (of all places), I am also getting multiple way records (for example) with the same id, but one record does not have tags

(09 Jan '22, 00:34) nickiemoto

I haven't investigated closely, but I expect the nwr statement is picking up the relations that https://www.openstreetmap.org/way/48590101 is part of, along with the way. So out body; prints the way as part of the set returned by nwr and then out skel qt; prints the way as part of the set returned by recursing down from the relation.

permanent link

answered 01 Feb '21, 12:39

maxerickson's gravatar image

maxerickson
12.7k1083176
accept rate: 32%

Yes that might be it I was under the impression that if a feature is part of out body; it would be omitted in skel qt;. Thanks.

(01 Feb '21, 14:06) Thagor

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:

×483
×228
×65

question asked: 01 Feb '21, 12:20

question was seen: 1,403 times

last updated: 09 Jan '22, 00:52

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