Search code examples
openstreetmapoverpass-api

How get all ways without ND tags in Overpass Turbo


I have this query,

area["name"="Greater London"];
way(area)["amenity"="restaurant"]->.all;
( .all; - ._; );
(._;);
out geom;

which return me this result

<way id="4270351">
    <bounds minlat="51.6322589" minlon="-0.0381454" maxlat="51.6327917" maxlon="-0.0376948"/>
    <nd ref="25637026" lat="51.6327251" lon="-0.0379737"/>
    <nd ref="25637027" lat="51.6327917" lon="-0.0377806"/>
    <nd ref="25637029" lat="51.6326585" lon="-0.0376948"/>
    <nd ref="25637030" lat="51.6323298" lon="-0.0378665"/>
    <nd ref="25637032" lat="51.6322589" lon="-0.0380668"/>
    <nd ref="25637034" lat="51.6324054" lon="-0.0381454"/>
    <nd ref="25637026" lat="51.6327251" lon="-0.0379737"/>
    <tag k="amenity" v="restaurant"/>
    <tag k="building" v="block"/>
    <tag k="created_by" v="JOSM"/>
</way>

Is there a way get same but without ND tags? like this:

<way id="4270351">
    <bounds minlat="51.6322589" minlon="-0.0381454" maxlat="51.6327917" maxlon="-0.0376948"/>
    <tag k="amenity" v="restaurant"/>
    <tag k="building" v="block"/>
    <tag k="created_by" v="JOSM"/>
</way>

I will get needed lat lon from , and in this case i don't want to get ND's because this tags make returned data heavy


Solution

  • According to the docs I mentioned you need to use out tags; to omit node details for your ways.

    To also include the bounding box, use:

    way(4270351);out tags bb;