Overpass query for swimming pools with length above 25 m ?

Hello guys,

I have been scratching my head about :

  1. how to combine two criteria ( swimming pool + length>25 )
  2. use the symbol >, which seems to be refused
  3. what is the default unit ? cm ? inch ? foot ? meter ?

I have tried for instance :
way"leisure"=“swimming_pool”[length>5]; ==> “>” is refused

Thank you

Various things:

  • length is a tag so I don’t think comparison operators are valid
  • the value 5 will be treated as a string by default
  • the {{bbox}} goes at the end of the filters

See this example of a similar question: https://stackoverflow.com/questions/41854953/overpass-api-comparison-operators

What you want is something like way[“leisure”=“swimming_pool”](if: t[“length”]>35)({{bbox}});

Note that I’d be surprised if many pools have the length specified, and many indoor pools will just be mapped as nodes.

Thank you

I have tried the following in order to obtain all the pools of which length is > 10 meters.

This has been generated by the overpass-turbo wizard.
The original search was:
““swimming pool””
// gather results
// query part for: ““swimming pool””
way[“leisure”=“swimming_pool”](if: t[“length”]>25)({{bbox}});
// print results
out body;

out skel qt;

Out of maybe 500 existing pools known by OSM within the bbox, it highlights only 1, so something is wrong. I guess people do not enter length when creating a pool object.

As an example, there are 44 in mainland GB/IE with a length tagged: https://overpass-turbo.eu/s/19FV .

There are about 8000 in total in GB: http://taginfo.geofabrik.de/europe/great-britain/tags/leisure=swimming_pool and 200 in Ireland: http://taginfo.geofabrik.de/europe/ireland-and-northern-ireland/tags/leisure=swimming_pool .

So yes, people (in GB/IE at least) don’t often tag the length.

If you want this type of information, I’d suggest requesting people consider adding it at the talk-gb mailing list. It’s usually known locally, so fellow contributors may be able to improve this aspect of the data quickly.