2

I can get informations on, for example, a stadium

[out:json];
(
  way[leisure=stadium]["name"~"Picot"](48.69241932797025,6.205483675003052,48.69873617918758,6.218605041503906);
);

out body;
>;
out skel qt;

But is there a way to get its entrance too (osm tag : entrance=main) ?

I think there is something better than the "around" command, but what... ?

3
  • Have you tried "node"?
    – Erik
    Jul 23, 2018 at 15:40
  • It does'nt work because I search the stadium by its name, and the entrance doesn't have a name key.
    – Fanch
    Jul 23, 2018 at 15:43
  • Maybe the stadiums entrance has not been uploaded to OSM yet?
    – Erik
    Jul 23, 2018 at 15:58

1 Answer 1

4

You need an area query to find entry=main node inside your stadium way. This doesn't work for every way (it depends on specific Area Creation Rules on the Overpass API server), but your example is just fine:

way(266223964);out geom;
map_to_area;  
node(area)[entrance=main];
out;

Try it in overpass turbo: http://overpass-turbo.eu/s/AuG

map_to_area maps the way id to the respective area id, to be used for the later area query. That's basically a query to return all nodes inside an area.

1
  • 1
    Thank you, that's what I need. And if it doesn't work because of the area type, I still can use an already known polygon with node[entrance=main](poly:“..."). I discovered that after searching more info on map_to_area.
    – Fanch
    Jul 24, 2018 at 7:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.