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

Fences distances in overpass turbo

0

Is it possible to query the sum of fences distances (in kilometers) in the view window or a bounding box of overpass turbo ?

asked 12 May '18, 08:17

sang3's gravatar image

sang3
26557
accept rate: 0%


One Answer:

1

Here is a quick example. You have to scroll to the bottom of the "data" tab to see the results.

[out:json][timeout:25][bbox:{{bbox}}];
way[barrier=fence];
out geom;
make stats length=sum(length()),section_lengths=set(length());
out;

Script is lightly modified version of the example given in https://github.com/drolbr/Overpass-API/issues/237.

(As far as I know, there is no area evaluator, I see you've asked the similar question about that)

answered 13 May '18, 12:35

maxerickson's gravatar image

maxerickson
12.7k1083176
accept rate: 32%