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

Overpass turbo: “runtime error: Filters too weak in query statement”

0

I'm trying to count how many pistes are there in a given country:

//[out:csv(::count, ::"count:nodes", ::"count:ways", ::"count:relations", ::"count:areas")];
area["ISO3166-1"="EE"];
(
  way(area)["piste:type"];
  node(area)["piste:type"];
  area(area)["piste:type"];
  relation(area)["piste:type"];
);
out;// count;

(link) When I run this commented one, I get an error:

runtime error: Filters too weak in query statement: specify in addition a bbox, a tag filter, or similar.

When I uncomment the rest, I get just the count of ways or whatever is the first statement in parenthesis.

How to do this correctly?

asked 07 Jan '20, 11:03

V0174's gravatar image

V0174
16226
accept rate: 0%

edited 07 Jan '20, 11:04


2 Answers:

2

The area needs to be stored ina variable & passed to each way type:

[out:csv(::count,::"count:nodes",::"count:ways",::"count:relations")];
area["ISO3166-1"="EE"]->.a;
(
  way(area.a)["piste:type"];
  node(area.a)["piste:type"];
  relation(area.a)["piste:type"];
);
out count;

However, it's much easier to amalgamate them to nwr:

[out:csv(::count,::"count:nodes",::"count:ways",::"count:relations")];
area["ISO3166-1"=EE]; // Estonia
nwr(area)["piste:type"];
out count;

answered 08 Jan '20, 14:39

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%

edited 11 Jan '20, 21:35

Thanks again, this does exactly what I need.

(08 Jan '20, 15:27) V0174

1

Remove the area type.

answered 07 Jan '20, 23:16

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%

Thanks, that was the reason for the error. However it still doesn't print all the counts separately, only the one that is stated as the first one in the union: https://overpass-turbo.eu/s/PzB Any idea?

(08 Jan '20, 13:43) V0174

Source code available on GitHub .