This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Find top 10 places furthest away from any any road/building/structure using Overpass QL

1

I am trying to find the 'remotest' places in Denmark using Overpass QL.

How do I construct a query that will show me the 10 places furthest from any 'civilization' or man-made structure?

asked 31 Jan '22, 06:22

eowhvad's gravatar image

eowhvad
26112
accept rate: 0%


One Answer:

0

Working from the example in the Overpass example page (which shows how to find banks that are far from police stations), came up with this. It's not exactly what you were after, but with a year with no answers, perhaps it's of some use :)

It looks for nodes or ways (address points or buildings with an assigned address) that are further than some distance from any road (highway=*). I used this criteria, as looking for other buildings could easily miss many cases where two buildings are very isolated from everything else. "Man-made structure" can also be pretty vague, as maybe there's some abandoned water tower, fence or anything else. In any case, both of the blocks can be expanded as needed, to include specific types of road or adapt what the "places" are.

[out:json][bbox:{{bbox}}][timeout:800];

(
  node["addr:housename"];
  way["addr:housename"];
)->.housenames;

( 
  way[highway];
)->.roads;

(
  node.housenames(around.roads:1000);
  way.housenames(around.roads:1000);
)->.namesNearRoads;

(.housenames; - .namesNearRoads;);

out geom meta;

answered 31 Mar '23, 21:09

Richlv's gravatar image

Richlv
1.7k153142
accept rate: 22%

Source code available on GitHub .