Overpass: Select area by way-ID

Hi,

I want to run a query with an area that is defined by a way. I used to do this by selecting the area by adding 2400000000 to the way-ID.

But: This doesn’t seem to work anymore, the wiki states:

// NOTE: 2400xxx AREA IDS FOR WAYS ARE NO LONGER SUPPORTED SINCE RELEASE 0.7.57

What’s the alternative to get the area if I have the way-ID?

Best regards and thanks for your support
dktue

What’s the alternative to get the area if I have the way-ID?

You can use a closed way directly as an area. For example

way(23055100)->.wa;
nwr(area.wa);
out geom;

In line 2, the reference to the way (the result of line 1) is used as
area. For the sake of simplicity, I’ve put that into a named variable
wa to ensure it can be used multiple times without being inadvertently
overwritten.

3 Likes

Super, vielen Dank! Das hilft! :slight_smile: