Prevent Overpass API from returning nodes and show ways only
Asked Answered
R

1

5

I'm trying to get all roads around a certain point. I'm using the following query:

(
  way
    (around:300,50.7913547,-1.0944082)
    ["highway"~"^(primary|secondary|tertiary|residential)$"]
    ["crossing"!~"."]
    ["name"];
  >;
);
out;

I added the crossing exclusion because it kept including "markers" for crossings, and I'm only interested in roads.

However it seems to be ignoring the crossing and still plotting markers on the map, rather than just showing road outlines. This can be seen here.

These "nodes" that I don't want have the tags:

crossing=zebra
highway=crossing

which should fail my regex query, but it doesn't.

How do I get it to just return road plot lines, and none of these nodes/markers?

Sorry if my terminology is all wrong, I'm very new to this

Regalado answered 7/10, 2014 at 14:56 Comment(0)
B
9

The filter criterion you tried to use would only apply to the way itself rather than the nodes. Usually, a way wouldn't have a crossing tag, so this filter didn't have much of an effect on the final result. By using >; all of the nodes tags would shown up in the final result again.

I removed >; in your query and replaced out; by out geom; to only output the node lat/lon position without any tags.

You can try this out using the following link (currently pointing to overpass turbo beta)

Link

enter image description here

Brownson answered 8/10, 2014 at 7:5 Comment(4)
Thanks, I was about to say how it was worse, but I've just realised that zooming out at certain levels turns the lines into markers :)Regalado
This is a rendering feature of Overpass Turbo. You can turn the markers off by clicking on Settings -> Map -> Don't display small features as POIs in Overpass Turbo. This will show exactly the result you want.Brownson
Is it possible to somewhow specify (override) the setting for this rendering feature in the query itself?Army
No, overpass turbo won't let you override those settings in the query.Brownson

© 2022 - 2024 — McMap. All rights reserved.